mnChangeBufferSizeTCP

This command changes the maximum size incoming TCP packets can be. Packets larger than this size may not be received.

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

mnSetBufferSizes can be used before the state is initialized (by mnConnect or mnStartServer) to set the maximum TCP buffer size for all clients. This command can only be used after the state is initialized.

In contrast with mnSetBufferSizes, this command can be used to change individual client’s buffer size. To change all clients’ buffer size set ClientID to 0. This command can be used on unused client IDs.

This command will not cause data loss. If the new buffer size is smaller than the current buffer size then the buffer size will be decreased as much as possible without causing data loss.

Parameters

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

int ClientID: This is the client ID of the client who’s TCP buffer size you wish to change. To change all clients’ buffer size set this to 0. This can be ignored in client state and can be set to anything.

unsigned int Size: This is the new buffer size (in bytes).

Returns (Integer)

0 if no error occurred

-1 if an error occurred

Present in

DBP

C++

.Net




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