Gio.SocketClient.prototype.set_timeout

function set_timeout(timeout: Number(guint)): void {
    // Gjs wrapper for g_socket_client_set_timeout()
}
  

Sets the I/O timeout for sockets created by client. timeout is a time in seconds, or 0 for no timeout (the default).

The timeout value affects the initial connection attempt as well, so setting this may cause calls to Gio.SocketClient.prototype.connect, etc, to fail with Gio.IOErrorEnum.timed_out.

Since 2.26

timeout

the timeout