#include <gridclienttcpconnection.hpp>
Public Member Functions | |
| bool | isPingPacket () const |
| size_t | getHeaderSize () const |
| void | setData (const ObjectWrapper &protoMsg) |
| ObjectWrapper | getData () const |
| size_t | getDataSize () const |
| void | setAdditionalHeaders (const GridClientMessage &msg) |
| void | setAdditionalHeaders (int8_t *pBuf) |
| void | setAdditionalHeadersAndData (int8_t *pBuf, size_t size) |
Static Public Member Functions | |
| static void | createPingPacket (GridClientTcpPacket &pingPacket) |
Static Public Attributes | |
| static const size_t | BASIC_HEADER_SIZE = 5 |
| static const size_t | REGULAR_HEADER_SIZE = BASIC_HEADER_SIZE + ADDITIONAL_HEADERS_SIZE |
| static const int8_t | SIGNAL_CHAR = (int8_t) 0x90 |
Friends | |
| class | GridClientSyncTcpConnection |
| class | GridClientRawSyncTcpConnection |
| std::ostream & | operator<< (std::ostream &stream, const GridClientTcpPacket &packet) |
This class represents a data packet used in GridGain binary protocol for data exchange.
The packet has the following structure:
----------------------------- | 0x90 (1 byte) | Special character to determine packet start. |---------------------------| | size (4 bytes) | Size of the data that follows. |---------------------------| | requestId (8 bytes) | | |---------------------------| | | clientId (16 bytes) | > These are called additional headers. |---------------------------| | | destinationId (16 bytes) | | |---------------------------| | DATA | -----------------------------
| void GridClientTcpPacket::createPingPacket | ( | GridClientTcpPacket & | pingPacket | ) | [static] |
Fills packet with ping data.
| size_t GridClientTcpPacket::getHeaderSize | ( | ) | const |
Returns header size of this packet.
| bool GridClientTcpPacket::isPingPacket | ( | ) | const |
Checks if this is a ping packet.
Checks if this is a ping packet.
const size_t GridClientTcpPacket::BASIC_HEADER_SIZE = 5 [static] |
Packet header size for ping packet.
const size_t GridClientTcpPacket::REGULAR_HEADER_SIZE = BASIC_HEADER_SIZE + ADDITIONAL_HEADERS_SIZE [static] |
Maximum packet header size.
const int8_t GridClientTcpPacket::SIGNAL_CHAR = (int8_t) 0x90 [static] |
First byte in binary protocol message.
1.7.1