CARMA C++
sza::util::NetTermHandler Class Reference

A handler for network messages between terminal servers and clients. More...

#include <carma/szautil/NetTermHandler.h>

Inherits sza::util::NetHandler.

Public Types

enum  MsgType { NONE, LINE, SHUTDOWN, DISCONNECT }
 

Public Member Functions

std::string getLastLine ()
 Return a copy of the last line read into the network buffer. More...
 
MsgType getLastMsgType ()
 Return the last message type read into the network buffer. More...
 
 NetTermHandler ()
 Constructor. More...
 
 NetTermHandler (int fd)
 Constructor. More...
 
void sendLine (std::string &line)
 Pack a line. More...
 
virtual ~NetTermHandler ()
 Destructor. More...
 
- Public Member Functions inherited from sza::util::NetHandler
void attach (int fd)
 Attach all streams to the same socket. More...
 
void attachReadStream (int fd)
 Attach the network I/O stream to a socket. More...
 
void attachSendStream (int fd)
 Attach the network I/O stream to a socket. More...
 
virtual int getFd ()
 Method for returning a single fd. More...
 
virtual int getReadFd ()
 Overwritable method for returning the read fd. More...
 
NetReadStr * getReadStr ()
 Return a pointer to our read stream. More...
 
virtual int getSendFd ()
 Overwritable method for returning the send fd. More...
 
NetSendStr * getSendStr ()
 Return a pointer to our read stream. More...
 
virtual void installErrorHandler (NET_ERROR_HANDLER(*handler), void *arg)
 
virtual void installReadErrorHandler (NET_ERROR_HANDLER(*handler), void *arg)
 
virtual void installReadHandler (NET_READ_HANDLER(*handler), void *arg)
 Methods to install user-defined handlers. More...
 
virtual void installSendErrorHandler (NET_ERROR_HANDLER(*handler), void *arg)
 
virtual void installSendHandler (NET_SEND_HANDLER(*handler), void *arg)
 
 NetHandler ()
 Constructor. More...
 
 NetHandler (int fd)
 Constructor. More...
 
sza::util::NetReadStr::NetReadId read ()
 Read a message into our network buffer from a socket described by a previously attached fd. More...
 
sza::util::NetReadStr::NetReadId read (int fd)
 Read a message into our network buffer from the specified socket. More...
 
sza::util::NetSendStr::NetSendId send ()
 Send a message packed into our network buffer to a socket described by a previously attached fd. More...
 
sza::util::NetSendStr::NetSendId send (int fd)
 Send a message packed into our network buffer to the specified socket. More...
 
void setReadBuffer (void *buffer, unsigned int size)
 Set the network buffer pointing to an external buffer, or pass buffer=NULL to dynamically allocate it. More...
 
void setSendBuffer (void *buffer, unsigned int size)
 Set the network buffer pointing to an external buffer, or pass buffer=NULL to dynamically allocate it. More...
 
virtual ~NetHandler ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from sza::util::NetHandler
int fd_
 
NetReadStr * nrs_
 
NetSendStr * nss_
 

Detailed Description

A handler for network messages between terminal servers and clients.

Definition at line 21 of file NetTermHandler.h.

Constructor & Destructor Documentation

sza::util::NetTermHandler::NetTermHandler ( )

Constructor.

sza::util::NetTermHandler::NetTermHandler ( int  fd)

Constructor.

virtual sza::util::NetTermHandler::~NetTermHandler ( )
virtual

Destructor.

Member Function Documentation

std::string sza::util::NetTermHandler::getLastLine ( )

Return a copy of the last line read into the network buffer.

MsgType sza::util::NetTermHandler::getLastMsgType ( )

Return the last message type read into the network buffer.

void sza::util::NetTermHandler::sendLine ( std::string &  line)

Pack a line.


The documentation for this class was generated from the following file: