set_socket_timeout ( : : Socket, Timeout : )

Set the timout of a socket.

set_socket_timeout sets the timout for the socket connection that is passed in Socket. The Timeout is only used for reading data from the socket and for calls to socket_accept_connect. If problems during the transmission of the data cause a timeout, the underlying protocol cannot synchonize itself with the data any longer. Therefore, in these cases, the only possibility to put the system into a consistent state is to close both sockets and to open them anew. It should be noted that sometimes while reading data no error message will be returned if the sending socket is closed while the receiving socket is waiting for data. In these cases, empty data are returned (either objects or tuples).

The timeout is given in seconds as a floating point number. It can also be set to 'infinite', causing the read calls to wait indefinitely.


Parameters

Socket (input_control)
socket_id -> integer
Socket number.

Timeout (input_control)
number -> real / integer / string
Socket timeout.
Default value: 'infinite'
Suggested values: 'infinite', 0, 1, 2, 3, 4, 5, 10, 30, 60


Parallelization Information

set_socket_timeout is reentrant and processed without parallelization.


Possible Predecessors

open_socket_accept, open_socket_connect, socket_accept_connect


Possible Successors

socket_accept_connect, receive_image, receive_region, receive_xld


See also

get_socket_timeout


Module

System



Copyright © 1996-2005 MVTec Software GmbH