.splittcppackets Property

Function:

For the currently selected socket (selection is made through sock.num), specifies whether the program will have additional control over the size of TCP packets being received and transmitted.

Type:

Enum (no_yes, byte)

Value Range:

0 — NO (default): regular processing of TCP data in which your program does not care about the size of individual TCP data packets being transmitted and received.

1 — YES: Additional features are enabled that allow your program to know the size of each incoming TCP packet and also control the size of each outgoing TCP packet.

See Also:

"Split Packet" Mode of TCP Data Processing

Details

When this property is set to 1 — YES your program gets an additional degree of control over TCP. For incoming TCP data, the program can know the size of individual incoming packets (this will be reported by the on_sock_tcp_packet_arrival event).

For outgoing TCP data, no packet will be sent out at all unless entire contents of the TX buffer can be sent. Therefore, by executing sock.send and waiting for sock.txlen = 0 your program can make sure that the packet sent will have exactly the size you needed.

The property is only relevant when the sock.inbandcommands = 0 — NO. With inband commands enabled, the socket will always behave as if the sock.splittcppackets = 0 — NO. The program won't be able to change the value of this property when the socket is not idle (sock.statesimple <> 0 — PL_SSTS_CLOSED).

Notice, that sending out TCP data and waiting for the sock.txlen = 0 significantly diminishes your TX data throughput. This is because each send will be waiting for the other end to confirm the reception of data.

Also, with sock.splittcppackets = 1 — YES make sure that you are not sending more data than the size of the RX buffer on the other end. If this happens, no data will ever get through because your side will be waiting for the chance to send out all TX data at once, and the other end won't be able to receive this much data in one piece.

Also, attempting to send the packet with size exceeding the "maximum segment size" (MSS) as specified by the other end will lead to data fragmentation! The socket will never send any TCP packet with the amount of data exceeding MSS.

Do not enable the split packet mode for a socket using TLS encryption.