38class VRPN_API vrpn_Forwarder_Brain {
41 vrpn_Forwarder_Brain(vrpn_Connection *);
42 virtual ~vrpn_Forwarder_Brain(
void);
46 virtual vrpn_bool start_remote_forwarding(vrpn_int32 remote_port) = 0;
51 virtual void forward_message_type(vrpn_int32 remote_port,
52 const char *service_name,
53 const char *message_type) = 0;
56 vrpn_Connection *d_connection;
60 vrpn_int32 d_start_forwarding_type;
61 vrpn_int32 d_forward_type;
63 static char *encode_start_remote_forwarding(vrpn_int32 *length,
64 vrpn_int32 remote_port);
65 static char *encode_forward_message_type(vrpn_int32 *length,
66 vrpn_int32 remote_port,
67 const char *service_name,
68 const char *message_type);
70 static void decode_start_remote_forwarding(
const char *buffer,
71 vrpn_int32 *remote_port);
72 static void decode_forward_message_type(
const char *buffer,
73 vrpn_int32 *remote_port,
91class VRPN_API vrpn_Forwarder_Server :
public vrpn_Forwarder_Brain {
94 vrpn_Forwarder_Server(vrpn_Connection *);
95 virtual ~vrpn_Forwarder_Server(
void);
97 virtual void mainloop(
void);
99 virtual vrpn_bool start_remote_forwarding(vrpn_int32 remote_port);
101 virtual void forward_message_type(vrpn_int32 remote_port,
102 const char *service_name,
103 const char *message_type);
118class VRPN_API vrpn_Forwarder_Controller :
public vrpn_Forwarder_Brain {
121 vrpn_Forwarder_Controller(vrpn_Connection *);
122 ~vrpn_Forwarder_Controller(
void);
124 virtual vrpn_bool start_remote_forwarding(vrpn_int32 remote_port);
126 virtual void forward_message_type(vrpn_int32 remote_port,
127 const char *service_name,
128 const char *message_type);