#include <NetCommPortal.hh>
Inherits FileCommPortal.
The concrete subclass of CommPortal which manages UDP based communications. It manages a UDP socket that messages can be received from and sent to. It is designed to be able to be used in conjunction with multiple NetRemoteManagers, as there can be multiple destinations sending through the same UDP socket.
Public Member Functions | |
virtual | ~NetCommPortal () |
bool | init (CommManager *mgr, int port) |
virtual Message * | receiveMsg () |
virtual bool | releaseMsg (Message *message) |
virtual bool | flush () |
NetRemoteManager * | openRemote (const char *machine, int port) |
Static Public Member Functions | |
NetCommPortal * | instance (utils::SymbolTable *table) |
|
This will close the UDP socket |
|
Flush message sends. If we are packaging or buffering message sends, force the real sends.
Implements CommPortal. |
|
Initialize the messager. Connect it to a CommManager and select a UDP port. A side effect is the storage of the portal in the manager's symbol table under the name NET_COMM_PORTAL_INSTANCE
Reimplemented from FileCommPortal. |
|
Returns the communications protocol instance from manager. It looks up the symbol in the manager's symbol table under NET_COMM_PORTAL_INSTANCE |
|
Open a remote manager via the net, or return it if it is already open.
|
|
Receive a message, blocking until one is available.
Implements CommPortal. |
|
Release a message received by CommPortal::receiveMsg. If you do not do this when you are done with a message, there will be a memory leak.
Implements CommPortal. |