setTimeout

open fun setTimeout(timeout: <Error class: unknown class>)

Sets the time in seconds after which I/O operations on @socket will time out if they have not yet completed.

On a blocking socket, this means that any blocking #GSocket operation will time out after @timeout seconds of inactivity, returning %G_IO_ERROR_TIMED_OUT.

On a non-blocking socket, calls to g_socket_condition_wait() will also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources created with g_socket_create_source() will trigger after

Since

2.26

Parameters

timeout

the timeout for @socket, in seconds, or 0 for none