on_sock_tcp_packet_arrival Event
Function: |
Notifies your program that the TCP packet of a certain size has arrived. |
Declaration: |
on_sock_tcp_packet_arrival(len as word) |
See Also: |
Part |
Description |
len |
Length of the new data in the RXed TCP packet. |
Details
This event is only generated when sock.splittcppackets = 1 — YES and sock.inbandcommands = 0 — DISABLED. Notice that only new data, never transmitted before, is counted. If the packet is a retransmission, then this event won't be generated. Also, if some part of a packet's data is a retransmission and some part is new, then only the length of the new data will be reported. This way your program can maintain the correct relationship between data lengths reported by this event and the actual data in the RX buffer.
The on_sock_tcp_packet_arrival event is always generated before the on_sock_data_arrival event for any incoming TCP data (packet).