network_set_timeout

Set the timeout for reading and writing data through a socket.

Syntax:

GML Code Example

network_set_timeout(socket, read_timeout, write_timeout);


Argument Description
socket The id of the socket to use.
read_timeout The milliseconds in which a transfer from a server will timeout.
write_timeout The milliseconds in which a transfer to a server will timeout.


Returns: N/A


Description

With this function you can set the timeout for reading and writing data to/from a server through the given socket. Note that the timeout does not generate any type of event, so you will need to deal with timeouts yourself using alarms (for example). Note that this value only affects the sending and receiving of data, and should you wish to change the connection timeout value then you should be using the function network_set_config.


Example:

GML Code Example

network_set_timeout(sock, 3000, 3000);

The above code will set the timeout for reading and writing data through the socket indexed in the variable "sock" to 3 seconds.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here