class AppServer Application server class
| | AppServer (const char* Name=0, long ofl=o_none, lmsg::NameProcs Typ=p_Any) Construct a server. |
| | ~AppServer (void) destroy the server. |
| | addHandler (MsgHeader::MsgType type, MsgHandler* handle) Specify a message handler. |
| | close (void) Close the server socket. |
| | handleMessage (void) Read a message and handle it. |
| | open (long flags) Open the server socket. |
| | receive (MsgHeader& hdr, void* data, size_type length, double timeout) Receive a message. |
| | receive (MsgHeader& hdr, void* data, size_type length) Receive a message. |
| | reply (const MsgHeader& to, const Message& data) Reply to a client request. |
| | reply (const MsgHeader& to, const MsgHeader& rhdr, const void* data) Reply to a client request. |
| | send (const MsgHeader& hdr, const Message& msg) Send a message to a peer. |
| | send (const MsgHeader& hdr, const void* data) Send a message to a peer. |
| | waitMsg (wtime_type time) Wait for a message to arrive. |
| | isOpen (void) const Test is socket is open. |
| | isRegistered (void) const Test is server name is registered. |
| | getTimeOut (void) const Get the default wait time. |
| | getDebug (void) const Debug level. |
| | register_name (const char* server, NameProcs type=p_Any) Register the server name. |
| | setDebug (index_type debug) Set the debug level |
| | setDomainName (const char* domain) Specify the name of the local name server |
| | setServerPort (const MsgAddr& addr) Specify the server address |
| | setTimeOut (wtime_type time) Get the default wait time. |
AppServer provides a server API for the LIGO/DMT messaging system.
virtual ~AppServer(void)
void addHandler(MsgHeader::MsgType type, MsgHandler* handle)
handle - Message handler pointer.
error_type close(void)
error_type handleMessage(void)
error_type open(long flags)
error_type receive(MsgHeader& hdr, void* data, size_type length, double timeout)
data - Buffer to receive the message text.
length - Length of the message text buffer in bytes.
timeout - Maximum wait time in seconds.
error_type receive(MsgHeader& hdr, void* data, size_type length)
data - Buffer to receive the message text.
length - Length of the message text buffer in bytes.
error_type reply(const MsgHeader& to, const Message& data)
data - Reply message.
error_type reply(const MsgHeader& to, const MsgHeader& rhdr, const void* data)
rhdr - Reply message header.
data - Pointer to the reply message text.
error_type send(const MsgHeader& hdr, const Message& msg)
msg - Message to be sent.
error_type send(const MsgHeader& hdr, const void* data)
data - Text of message to be sent.
bool waitMsg(wtime_type time)
bool isOpen(void) const
bool isRegistered(void) const
wtime_type getTimeOut(void) const
index_type getDebug(void) const
error_type register_name(const char* server, NameProcs type=p_Any)
void setDebug(index_type debug)
void setDomainName(const char* domain)
void setServerPort(const MsgAddr& addr)
void setTimeOut(wtime_type time)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++