55 #pragma warning( disable : 4251 )
57 #pragma warning( disable : 4275 )
63 class ServerAcceptReceiver;
415 unsigned int uiRawMsgSize,
416 unsigned int uiMessageID = 0,
418 const std::string & rstrInfo =
"" );
469 int getPeerName( std::string & rstrIPAdress,
unsigned int & ruiPort )
const;
553 std::map< SOCKET, ServerReceiverTransmitter *, std::less< SOCKET > >
m_ClientMap;
578 Server(
unsigned int,
int,
int,
int,
int );
589 Server(
unsigned int,
int,
int,
int,
unsigned int,
int );
629 unsigned int uiDataSize,
630 unsigned long ulMaxClients,
694 #if defined (__PTHREADS)
710 virtual void cleanUp();
818 unsigned int iDataSize )
const;
907 virtual int send( SOCKET ClientSocket,
909 unsigned int uiRawMsgSize,
910 unsigned int uiMessageID = 0,
912 const std::string & rstrInfo =
"" );
980 #pragma warning( default : 4251 )
982 #pragma warning( default : 4275 )
Header for AbstractMessage, Message, ServerAcceptMessage and ServerMessage.
For each library, here 'TcpLib' there is a type file.
#define __tcp_export_dll
Definition TcpTypes.h:59
Base class for messages which can be sent, received and processed by the Tcp-classes.
Definition TcpMessage.h:97
Contains a data stream which can be sent and received by the Tcp classes.
Definition TcpMessage.h:168
Tuple of socket Receiver and Transmitter for the Server.
Definition TcpServer.h:286
int send(Message *pTcpMessage)
Transmitter * m_pTransmitter
Definition TcpServer.h:310
ServerReceiverTransmitter(const ServerReceiverTransmitter &rT)
int send(char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID=0, int iActionCode=0, const std::string &rstrInfo="")
int getPeerName(std::string &rstrIPAdress, unsigned int &ruiPort) const
ServerReceiverTransmitter(Transmitter *pTransmitter, ServerReceiver *pReceiver)
ServerReceiver * m_pReceiver
Definition TcpServer.h:299
ServerReceiverTransmitter()
virtual ~ServerReceiverTransmitter()
void setValid(bool bValid)
Accept-Receiver accepts new clients and registers them with its parent object (usually a Server or a ...
Definition TcpServerAcceptReceiver.h:83
A simple TCP server class, which should learn its know-how in the derived classes.
Definition TcpServer.h:268
virtual void insertNewClient(Server::ServerReceiverTransmitter *pNewServerReceiverTransmitter)
virtual int send(SOCKET ClientSocket, char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID=0, int iActionCode=0, const std::string &rstrInfo="")
Server(unsigned int, int, int, int, unsigned int, int)
virtual Server::ServerReceiverTransmitter * generateNewServerReceiverTransmitter(Server *pParent, SOCKET Socket, unsigned int iDataSize) const
virtual int removeClient(SOCKET Socket)
std::queue< AbstractMessage * > m_MsgQueue
Definition TcpServer.h:528
virtual void cancel() override
unsigned long m_ulMaxClients
Definition TcpServer.h:517
void setClientMapReceiverValid(bool bValid)
int acceptClientMessage(AbstractMessage *pTcpMessage)
virtual int send(Message *pTcpMessage) override
Server(unsigned int uiPort, int iAdressFamily, int iSocketType, int iProtocol, unsigned int uiDataSize, unsigned long ulMaxClients, int iSecTimeOut)
std::map< SOCKET, ServerReceiverTransmitter *, std::less< SOCKET > > m_ClientMap
Definition TcpServer.h:553
Server(unsigned int, int, int, int, int)
Server::ServerReceiverTransmitter * getClient(SOCKET Socket)
virtual void work() override
ServerAcceptReceiver * m_pAcceptReceiver
Definition TcpServer.h:542
unsigned long getMaxClients() const
virtual void processClientMessage(AbstractMessage *pTcpMessage)
Class that communicates with a Client via a SOCKET and delivers its receive result of type ServerMess...
Definition TcpServerReceiver.h:81
Superclass for Client and Server, which 'learns' its know-how in the derived classes.
Definition TcpMain.h:110
A class that communicates with a Client or Server via a SOCKET and expects send data of type Message.
Definition TcpTransmitter.h:75
Definition TcpClient.h:55