GlobalObjects
Loading...
Searching...
No Matches
glo::TcpServerReceiver Class Reference

Class that communicates with a tcp::Client via a SOCKET and delivers the result of the reception of the type Message to its parent, which must be a Server. The deliver to the parent via method acceptMessage(AbstractMessage*) has been changed by overwriting, the Manager is addressed if necessary. More...

#include <GloTcpServerReceiver.h>

Inheritance diagram for glo::TcpServerReceiver:

Public Member Functions

 TcpServerReceiver (tcp::Server *pParent, SOCKET Socket, unsigned int uiDataSize)
 
virtual ~TcpServerReceiver ()
 
- Public Member Functions inherited from tcp::ServerReceiver
 ServerReceiver (Server *pParent, SOCKET Socket, unsigned int uiDataSize)
 
virtual ~ServerReceiver ()
 
virtual void cancel () override
 
void setValid (bool bValid)
 
- Public Member Functions inherited from tcp::DataReceiver
 DataReceiver (TcpMain *pParent, SOCKET Socket, unsigned int uiDataSize)
 
virtual ~DataReceiver ()
 
unsigned int getDataSize () const
 
void setDataSize (unsigned int uiDataSize)
 
- Public Member Functions inherited from tcp::Receiver
 Receiver (TcpMain *pParent, SOCKET Socket)
 
virtual ~Receiver ()
 
- Public Member Functions inherited from tcp::ReceiverTransmitter
 ReceiverTransmitter (SOCKET Socket)
 
virtual ~ReceiverTransmitter ()
 
virtual void finishBreak () override
 
int getPeerName (std::string &rstrIPAdress, unsigned int &ruiPort) const
 
SOCKET Socket () const
 
virtual void takeABreak () override
 
- Public Member Functions inherited from eut::RepeatingThread
 RepeatingThread ()
 
virtual ~RepeatingThread ()
 
int getBreakCounter ()
 
bool isInExclusiveAccess () const
 
void setExclusiveAccess ()
 
void signalInput ()
 
virtual int start ()
 
RepeatingThread::STATUS status () const
 
bool testCancel ()
 
void unsetExclusiveAccess ()
 
void waitForInput ()
 

Protected Member Functions

virtual int acceptMessage (tcp::AbstractMessage *pTcpMessage)
 
int getSchemaMap (std::map< unsigned long, ClassInfo *, std::less< unsigned long > > &rSchemaMap, const std::string &rstrBaseName, bool bCopy=true)
 
void setReceiverTransmitter (Server::TcpServerReceiverTransmitter *pReceiverTransmitter)
 
 TcpServerReceiver ()
 
 TcpServerReceiver (SOCKET Socket)
 
 TcpServerReceiver (tcp::TcpMain *pParent, SOCKET Socket)
 
 TcpServerReceiver (tcp::TcpMain *pParent, SOCKET Socket, unsigned int iDataSize)
 
- Protected Member Functions inherited from tcp::ServerReceiver
 ServerReceiver ()
 
 ServerReceiver (SOCKET)
 
 ServerReceiver (TcpMain *, SOCKET)
 
 ServerReceiver (TcpMain *, SOCKET, unsigned int)
 
virtual void generateNewTcpMessage (AbstractMessage *&prTcpServerMessage, char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo) const override
 
virtual void generateNewTcpMessage (AbstractMessage *&prTcpServerMessage, char *pszTransmitData, unsigned int uiTransmitDataSize) const override
 
virtual void work () override
 
- Protected Member Functions inherited from tcp::DataReceiver
 DataReceiver ()
 
 DataReceiver (SOCKET)
 
 DataReceiver (TcpMain *, SOCKET)
 
void initStreamData ()
 
int processReceivedData (char *pszSentBuffer, unsigned int t_uiSentBufferSize)
 
- Protected Member Functions inherited from tcp::Receiver
 Receiver ()
 
 Receiver (SOCKET Socket)
 
- Protected Member Functions inherited from tcp::ReceiverTransmitter
 ReceiverTransmitter ()
 
- Protected Member Functions inherited from eut::RepeatingThread
ORDER getOrder ()
 
STATUS getStatus ()
 
void setStatus (STATUS eStatus)
 
void threadWork ()
 
void toOrder (ORDER eOrder)
 

Private Attributes

Server::TcpServerReceiverTransmitterm_pMyReceiverTransmitter
 
std::string m_sSchemaName
 

Friends

class Server
 

Additional Inherited Members

- Public Types inherited from eut::RepeatingThread
enum  EuTHREADERROR { EuTHREAD_ERR_NO_THREAD = -10301 , EuTHREAD_ERR_THREAD_ALREADY_WORKING = -10302 , EuTHREAD_ERR_THREAD_BREAK_COUNT_LESS_THAN_ZERO = -10303 , EuTHREAD_ERR_UNKNOWN = -10400 }
 Error range = -10301 to -10400 More...
 
enum  ORDER { eUNDEFINED , eDO_WORK , eEXIT }
 
enum  STATUS {
  eAT_THE_START , eWORKING , ePAUSING , eENDING ,
  eCOMPLETED
}
 
- Public Attributes inherited from eut::RepeatingThread
std::string m_strDebugInfo
 
- Protected Attributes inherited from tcp::ServerReceiver
bool m_bValid
 
- Protected Attributes inherited from tcp::DataReceiver
char * m_pszSentBuffer
 
char * m_szStreamBuffer
 
unsigned int m_uiDataSize
 
unsigned int m_uiStreamPosistion
 
unsigned int m_uiStreamSize
 
- Protected Attributes inherited from tcp::Receiver
TcpMainm_pParentTcpMain
 
- Protected Attributes inherited from tcp::ReceiverTransmitter
SOCKET m_Socket
 

Detailed Description

Class that communicates with a tcp::Client via a SOCKET and delivers the result of the reception of the type Message to its parent, which must be a Server. The deliver to the parent via method acceptMessage(AbstractMessage*) has been changed by overwriting, the Manager is addressed if necessary.

Author
Helmut Jakoby

Constructor & Destructor Documentation

◆ TcpServerReceiver() [1/5]

glo::TcpServerReceiver::TcpServerReceiver ( )
protected

This constructor is not available.

◆ TcpServerReceiver() [2/5]

glo::TcpServerReceiver::TcpServerReceiver ( SOCKET Socket)
protected

This constructor is not available.

◆ TcpServerReceiver() [3/5]

glo::TcpServerReceiver::TcpServerReceiver ( tcp::TcpMain * pParent,
SOCKET Socket )
protected

This constructor is not available.

◆ TcpServerReceiver() [4/5]

glo::TcpServerReceiver::TcpServerReceiver ( tcp::TcpMain * pParent,
SOCKET Socket,
unsigned int iDataSize )
protected

This constructor is not available.

◆ TcpServerReceiver() [5/5]

glo::TcpServerReceiver::TcpServerReceiver ( tcp::Server * pParent,
SOCKET Socket,
unsigned int uiDataSize )

Constructor with parameter passing.

Parameters
[in]pParentThe owning parent object, must be a Server here. The type is not checked separately, the calling instance knows what it is doing.
[in]SocketThe socket over which communication takes place.
[in]uiDataSizeThe package size.
Exceptions
eut::ErrorNExceptionAn exception is thrown if an error occurs.

◆ ~TcpServerReceiver()

virtual glo::TcpServerReceiver::~TcpServerReceiver ( )
virtual

Destructor.

Member Function Documentation

◆ acceptMessage()

virtual int glo::TcpServerReceiver::acceptMessage ( tcp::AbstractMessage * pTcpMessage)
protectedvirtual

The message, which must be of type ServerMessage, is evaluated and usually forwarded to the Manager.

Parameters
[in]pTcpMessageThe received message.
Returns
A return < 0 indicates an error.

Reimplemented from tcp::ServerReceiver.

◆ getSchemaMap()

int glo::TcpServerReceiver::getSchemaMap ( std::map< unsigned long, ClassInfo *, std::less< unsigned long > > & rSchemaMap,
const std::string & rstrBaseName,
bool bCopy = true )
protected

Returns the class information of a database.

Parameters
[in,out]rSchemaMapThe list of class information objects.
[in]rstrBaseNameThe name of the database from which the class information objects are to be extracted.
[in]bCopyCopies or originals:
  • If true, copies of the class information are inserted into rClassInfoMap; then calling instance must remove this object from memory.
  • If false, the originals of the class information are inserted into rClassInfoMap; then the calling instance must not remove this object from memory.
Returns
A return value < 0 indicates an error.

◆ setReceiverTransmitter()

void glo::TcpServerReceiver::setReceiverTransmitter ( Server::TcpServerReceiverTransmitter * pReceiverTransmitter)
protected

Sets the own TcpServerReceiverTransmitter.

Parameters
[in]pReceiverTransmitterThe TcpServerReceiverTransmitter used here.

Friends And Related Symbol Documentation

◆ Server

friend class Server
friend

Member Data Documentation

◆ m_pMyReceiverTransmitter

Server::TcpServerReceiverTransmitter* glo::TcpServerReceiver::m_pMyReceiverTransmitter
private

The TcpServerReceiverTransmitter, which receives or sends the packets in order to be able to reply directly to the client.

◆ m_sSchemaName

std::string glo::TcpServerReceiver::m_sSchemaName
private

The name of the underlying scheme.


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