1#ifndef INC_TCPMESSAGE_H
2#define INC_TCPMESSAGE_H
47#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
49#elif defined(__GNUC__)
58 #include <sys/types.h>
59 #include <sys/socket.h>
60 #include <netinet/in.h>
62 #include <arpa/inet.h>
63 #define SOCKET uintptr_t
64 #define SOCKADDR_IN sockaddr_in
65 #define SOCKADDR sockaddr
66 #define HOSTENT hostent
67 #define INVALID_SOCKET (SOCKET)(~0)
68 #define SOCKET_ERROR (-1)
73 #pragma warning( disable : 4251 )
322 Message(
char * pszTransmitData, std::size_t nTransmitDataSize );
354 std::size_t nRawMsgSize,
355 unsigned int uiMessageID,
357 const std::string & rstrInfo );
524 std::size_t
getRawMsg(
char *& prszRawMsg,
bool bCopy =
true );
800 char * pszTransmitData,
801 std::size_t nTransmitDataSize );
833 std::size_t nRawMsgSize,
834 unsigned int uiMessageID,
836 const std::string & rstrInfo);
882 #pragma warning( default : 4251 )
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
virtual ~AbstractMessage()
Contains a data stream which can be sent and received by the Tcp classes.
Definition TcpMessage.h:168
std::size_t getRawMsg(char *&prszRawMsg, bool bCopy=true)
int m_iActionCode
Definition TcpMessage.h:202
int getActionCode() const
std::size_t getRawMsgSize() const
Message(char *pszTransmitData, std::size_t nTransmitDataSize)
int initSendMsgFromData()
std::size_t m_nTransmitDataSize
Definition TcpMessage.h:246
unsigned int m_uiMessageID
Definition TcpMessage.h:181
char * m_pszRawMessage
Definition TcpMessage.h:235
Message(char *pszRawMsg, std::size_t nRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo)
unsigned int getMsgID() const
char * getTransmitDataPt()
int initDataFromSendMsg()
std::string getInfo() const
std::size_t getTransmitData(char *&prszSendMsg, bool bCopy=true)
char * m_pszTransmitData
Definition TcpMessage.h:257
std::string m_strInfo
Definition TcpMessage.h:213
std::size_t m_nRawMessageSize
Definition TcpMessage.h:224
std::size_t getTransmitDataSize() const
A special Tcp message, with which the ServerAcceptReceiver can register a new Client.
Definition TcpMessage.h:587
ServerAcceptMessage(const ServerAcceptMessage &)
ServerAcceptMessage(SOCKET NewSocket)
SOCKET m_ClientSocket
Definition TcpMessage.h:600
virtual ~ServerAcceptMessage()
Is a special Tcp message for the Server. The socket is included so that the server knows to whom it s...
Definition TcpMessage.h:725
ServerMessage(const ServerMessage &)
ServerMessage(SOCKET ClientSocket, char *pszRawMsg, std::size_t nRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo)
ServerMessage(char *, std::size_t)
ServerMessage(SOCKET ClientSocket, char *pszTransmitData, std::size_t nTransmitDataSize)
Definition TcpClient.h:55