VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtUdpMessageClient Class Reference

A remote UDP client that the UDP server communicates with. More...

Inheritance diagram for makVrv::DtUdpMessageClient:
Inheritance graph
[legend]

Public Member Functions

 DtUdpMessageClient (DtDe &de, DtInetSocket *socket, size_t maxPacketSize)
 Construct a client from an existing socket. More...
 
virtual ~DtUdpMessageClient ()
 DTOR. More...
 
virtual void deliver (DtMessage &msg)
 Deliver function. More...
 
virtual void sendAndFlush ()
 Send and flush the internal buffer. More...
 
virtual void getServerMessages (MessageList &)
 Get any server messages. More...
 
DtInetSocket * socket () const
 Get the remote client socket. More...
 
virtual void readData ()
 Read data from the server. More...
 
bool isOk () const
 Check to see if the client is ok. More...
 
size_t maxPacketSize () const
 
- Public Member Functions inherited from makVrv::DtMessageClient
 DtMessageClient (const std::string &clientName)
 static const int ClientNameSize = 128; More...
 
virtual ~DtMessageClient ()
 DTOR. More...
 
virtual const std::string & name () const
 Get the client's name. More...
 

Static Public Member Functions

static std::string errorString (int code)
 Get a string description of the error code. More...
 

Protected Member Functions

int lastError ()
 

Protected Attributes

DtDemyDe
 
DtInetSocket * mySocket
 
bool myOkFlag
 
double mySendTimeout
 
DtMessageStream myInputStream
 
DtMessageStream myOutputStream
 
size_t myMaxPacketSize
 
- Protected Attributes inherited from makVrv::DtMessageClient
std::vector< IGIInterfaceIDmyInterfaceMap
 
std::string myName
 

Additional Inherited Members

- Public Types inherited from makVrv::DtMessageClient
typedef std::vector< DtMessage * > MessageList
 
typedef unsigned short IGIInterfaceID
 The IGIInterfaceID type. More...
 

Detailed Description

A remote UDP client that the UDP server communicates with.

Constructor & Destructor Documentation

makVrv::DtUdpMessageClient::DtUdpMessageClient ( DtDe de,
DtInetSocket *  socket,
size_t  maxPacketSize 
)

Construct a client from an existing socket.

The message client takes ownership of the socket (and deletes it)

virtual makVrv::DtUdpMessageClient::~DtUdpMessageClient ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtUdpMessageClient::deliver ( DtMessage msg)
virtual

Deliver function.

Implements makVrv::DtMessageClient.

virtual void makVrv::DtUdpMessageClient::sendAndFlush ( )
virtual

Send and flush the internal buffer.

This function is called by deliver.

virtual void makVrv::DtUdpMessageClient::getServerMessages ( MessageList )
virtual

Get any server messages.

getServerMessages will call DtDe::quit() if a corrupted input stream is detected (as there is no good way to recover from that and you're better off exiting so a reconnect can be done).

Implements makVrv::DtMessageClient.

DtInetSocket* makVrv::DtUdpMessageClient::socket ( ) const

Get the remote client socket.

virtual void makVrv::DtUdpMessageClient::readData ( )
virtual

Read data from the server.

bool makVrv::DtUdpMessageClient::isOk ( ) const

Check to see if the client is ok.

size_t makVrv::DtUdpMessageClient::maxPacketSize ( ) const
static std::string makVrv::DtUdpMessageClient::errorString ( int  code)
static

Get a string description of the error code.

int makVrv::DtUdpMessageClient::lastError ( )
protected

Member Data Documentation

DtDe& makVrv::DtUdpMessageClient::myDe
protected
DtInetSocket* makVrv::DtUdpMessageClient::mySocket
protected
bool makVrv::DtUdpMessageClient::myOkFlag
protected
double makVrv::DtUdpMessageClient::mySendTimeout
protected
DtMessageStream makVrv::DtUdpMessageClient::myInputStream
protected
DtMessageStream makVrv::DtUdpMessageClient::myOutputStream
protected
size_t makVrv::DtUdpMessageClient::myMaxPacketSize
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)