Is a special Tcp message for the Server. The socket is included so that the server knows to whom it should send the data.
More...
#include <TcpMessage.h>
|
| ServerMessage (SOCKET ClientSocket, char *pszRawMsg, std::size_t nRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo) |
|
| ServerMessage (SOCKET ClientSocket, char *pszTransmitData, std::size_t nTransmitDataSize) |
|
virtual | ~ServerMessage () |
|
| Message (char *pszRawMsg, std::size_t nRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo) |
|
| Message (char *pszTransmitData, std::size_t nTransmitDataSize) |
|
virtual | ~Message () |
|
int | getActionCode () const |
|
std::string | getInfo () const |
|
unsigned int | getMsgID () const |
|
std::size_t | getRawMsg (char *&prszRawMsg, bool bCopy=true) |
|
char * | getRawMsgPt () |
|
std::size_t | getRawMsgSize () const |
|
std::size_t | getTransmitData (char *&prszSendMsg, bool bCopy=true) |
|
char * | getTransmitDataPt () |
|
std::size_t | getTransmitDataSize () const |
|
virtual | ~AbstractMessage () |
|
| ServerAcceptMessage (SOCKET NewSocket) |
|
virtual | ~ServerAcceptMessage () |
|
void | closeSocket () |
|
SOCKET | getSocket () |
|
Is a special Tcp message for the Server. The socket is included so that the server knows to whom it should send the data.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ ServerMessage() [1/5]
tcp::ServerMessage::ServerMessage |
( |
| ) |
|
|
protected |
This constructor is not available.
◆ ServerMessage() [2/5]
tcp::ServerMessage::ServerMessage |
( |
char * | , |
|
|
std::size_t | ) |
|
protected |
This constructor is not available.
◆ ServerMessage() [3/5]
tcp::ServerMessage::ServerMessage |
( |
SOCKET | ClientSocket, |
|
|
char * | pszTransmitData, |
|
|
std::size_t | nTransmitDataSize ) |
Art constructor with parameters.
- Parameters
-
[in] | ClientSocket | The client socket. |
[in] | pszTransmitData | The data buffer to be transmitted including all required Information:
- the abbreviation "hja-tcp" (0-terminated) a simple non-secure way to filter foreign messages.
- the size of the entire message, i.e. header plus message data (0-terminated)
- A message ID (0-terminated)
- a ActionCode (0-terminated)
- an info (0-terminated)
- the message data of the message
|
[in] | nTransmitDataSize | The size or length of the data buffer to be sent. |
- Attention
- This object takes over the removal of the pszTransmitData from the memory.
- Exceptions
-
eut::ErrorNException | An exception is thrown if the attributes cannot be set from the data (e.g. because the header is incorrect). |
◆ ServerMessage() [4/5]
tcp::ServerMessage::ServerMessage |
( |
SOCKET | ClientSocket, |
|
|
char * | pszRawMsg, |
|
|
std::size_t | nRawMsgSize, |
|
|
unsigned int | uiMessageID, |
|
|
int | iActionCode, |
|
|
const std::string & | rstrInfo ) |
Art constructor with parameters.
- Parameters
-
[in] | ClientSocket | The client socket. |
[in] | pszRawMsg | The message data. |
[in] | nRawMsgSize | The size or length of the message data. |
[in] | uiMessageID | A unique ID. |
[in] | iActionCode | The ActionCode, see m_iActionCode. |
[in] | rstrInfo | An additional text info |
- Attention
- This object removes the pszRawMsg from the memory
- Exceptions
-
◆ ~ServerMessage()
virtual tcp::ServerMessage::~ServerMessage |
( |
| ) |
|
|
virtual |
◆ ServerMessage() [5/5]
The copy constructor is not available.
◆ operator=()
The assignment operator is not available.
The documentation for this class was generated from the following file: