Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

NetRemoteManager Class Reference
[Communications Facilities]

#include <NetRemoteManager.hh>

Inherits RemoteManager.

List of all members.


Detailed Description

Class for a remote manager connected via the UDP socket.

This class contains all the information a communication manager has about a remote communications manager and provides an abstracted method for sending messages.


Public Member Functions

 NetRemoteManager (NetCommPortal *portal, struct in_addr addr, unsigned short port)
virtual bool sendMsg (Message *msg, unsigned char *preamble=NULL, int preamble_size=0)
in_addr getAddress () const
unsigned short getPort () const
bool flush ()
bool flushMsg (Message *msg, unsigned char *preamble, int preamble_size)
bool flushBuffer ()


Constructor & Destructor Documentation

NetRemoteManager::NetRemoteManager NetCommPortal portal,
struct in_addr  addr,
unsigned short  port
 

Constructor

Parameters:
[in] portal The network communications portal used for output
[in] addr The network address of the remote manager
[in] port The network port of the remote manager


Member Function Documentation

bool NetRemoteManager::flush  ) 
 

Flushes any buffered output to this remote manager

bool NetRemoteManager::flushBuffer  ) 
 

Immediately write the buffer of messages to the UDP socket

Returns:
Return true if successful, false if not

bool NetRemoteManager::flushMsg Message msg,
unsigned char *  preamble,
int  preamble_size
 

Immediately write a message to the UDP socket

Parameters:
[in] msg The message to send. If no message, just send the preamble
[in] preamble If there, precede the message data with the preamble data
[in] preamble_size If there, the size of the preamble data
Returns:
Return true if successful, false if not

struct in_addr NetRemoteManager::getAddress  )  const [inline]
 

This method returns the network address of the remote communication manager's machine.

unsigned short NetRemoteManager::getPort  )  const [inline]
 

This method returns the UDP port monitored by the remote communication manager.

virtual bool NetRemoteManager::sendMsg Message msg,
unsigned char *  preamble = NULL,
int  preamble_size = 0
[virtual]
 

Sends a message to the remote manager

Parameters:
[in] msg The message to send. If no message, just send the preamble
[in] preamble If there, precede the message data with the preamble data
[in] preamble_size If there, the size of the preamble data
Returns:
Return true if successful, false if not

Implements RemoteManager.


RHexLib Reference Documentation