mnGetTCPBytes

This command returns the number of bytes of unused data in the specified client’s TCP buffer.

This command can be used in server (mnStartServer) and client state (mnConnect).

Newly received TCP data is put into a TCP buffer and extracted in the form of complete packets which are then put into a queue (mnRecvTCP) or passed to a function (mnSetFunction).

Data is deemed to be unused if it does not yet make up a complete packet.

mnGetTCPPercent is a similar function that can be used to determine what percentage of a packet has been received.

This command will work in TCP mode ‘postfix’ (2), whilst mnGetTCPPercent will not.

Parameters

int Instance: This is the instance that the command should use.

int ClientID: This is the client ID that the command should use. This can be ignored in client state and can be set to anything.

Returns (Unsigned Integer)

Any number if no error occurred. This is the amount of unused data in the specified client’s TCP buffer.

0 if an error occurred.

Present in

DBP

C++

.Net




This page is in the following sections:
(2) Networking Commands
(1) Networking
(0) DarkNet Help