GlobalObjects
Loading...
Searching...
No Matches
glo::Server::TcpServerReceiverTransmitter Class Reference

A special ServerReceiverTransmitter for the Server. Its ServerReceiver is of the derived type TcpServerReceiver and this can send orders. More...

#include <GloServer.h>

Inheritance diagram for glo::Server::TcpServerReceiverTransmitter:

Public Member Functions

 TcpServerReceiverTransmitter (tcp::Transmitter *pTransmitter, tcp::ServerReceiver *pReceiver)
 
virtual ~TcpServerReceiverTransmitter ()
 
ServerThreadgetServerThread ()
 
virtual int sendOrder (OrderMsg *pOrderMsg, tcp::ActionCode eTcpActionCode)
 
- Public Member Functions inherited from tcp::Server::ServerReceiverTransmitter
 ServerReceiverTransmitter (Transmitter *pTransmitter, ServerReceiver *pReceiver)
 
virtual ~ServerReceiverTransmitter ()
 
int getPeerName (std::string &rstrIPAdress, unsigned int &ruiPort) const
 
int send (char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID=0, int iActionCode=0, const std::string &rstrInfo="")
 
int send (Message *pTcpMessage)
 
void setValid (bool bValid)
 
SOCKET Socket () const
 

Protected Member Functions

 TcpServerReceiverTransmitter ()
 
- Protected Member Functions inherited from tcp::Server::ServerReceiverTransmitter
 ServerReceiverTransmitter ()
 

Private Member Functions

 TcpServerReceiverTransmitter (const TcpServerReceiverTransmitter &)
 
TcpServerReceiverTransmitteroperator= (const TcpServerReceiverTransmitter &)
 

Private Attributes

ServerThreadm_pServerThread
 

Detailed Description

A special ServerReceiverTransmitter for the Server. Its ServerReceiver is of the derived type TcpServerReceiver and this can send orders.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TcpServerReceiverTransmitter() [1/3]

glo::Server::TcpServerReceiverTransmitter::TcpServerReceiverTransmitter ( )
protected

This constructor is not available.

◆ TcpServerReceiverTransmitter() [2/3]

glo::Server::TcpServerReceiverTransmitter::TcpServerReceiverTransmitter ( tcp::Transmitter * pTransmitter,
tcp::ServerReceiver * pReceiver )

This constructor starts the passed reader and writer and instantiates its ServerThread with itself as parameter.

Parameters
[in]pTransmitterThe writer (sends data to a Client).
[in]pReceiverThe reader (receives data from a Client)
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.
See also
ServerThread::ServerThread( Server::TcpServerReceiverTransmitter*)

◆ ~TcpServerReceiverTransmitter()

virtual glo::Server::TcpServerReceiverTransmitter::~TcpServerReceiverTransmitter ( )
virtual

Destructor; the ServerThread, Writer and Reader are mined.

◆ TcpServerReceiverTransmitter() [3/3]

glo::Server::TcpServerReceiverTransmitter::TcpServerReceiverTransmitter ( const TcpServerReceiverTransmitter & )
private

The copy constructor is not available.

Member Function Documentation

◆ getServerThread()

ServerThread * glo::Server::TcpServerReceiverTransmitter::getServerThread ( )

Returns a pointer to its server thread.

Returns
The pointer to the server thread.

◆ operator=()

TcpServerReceiverTransmitter & glo::Server::TcpServerReceiverTransmitter::operator= ( const TcpServerReceiverTransmitter & )
private

The assignment operator is not available.

◆ sendOrder()

virtual int glo::Server::TcpServerReceiverTransmitter::sendOrder ( OrderMsg * pOrderMsg,
tcp::ActionCode eTcpActionCode )
virtual

Converts the order into a streamable buffer and sends it to the client.

Parameters
[in]pOrderMsgThe order to be sent.
[in]eTcpActionCodeThe TCP action code.
Returns
A return < 0 indicates an error.
See also
OrderMsg::streamOrderInBlob(eut::Blob&,EnStreamOrderDataType) const
Server::ServerReceiverTransmitter::send(char*,unsigned int,unsigned int,int,const std::string&)

Member Data Documentation

◆ m_pServerThread

ServerThread* glo::Server::TcpServerReceiverTransmitter::m_pServerThread
private

The ServerThread (derived from Communicator and counterpart of the Manager) knows about its TcpServerReceiverTransmitter and can therefore communicate with the tcp::Transmitter and ServerReceiver.

Is instantiated in the constructor.


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