Hoogle Search
Within LTS Haskell 24.69 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
socketSetTimeout :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()gi-gio GI.Gio.Objects.Socket 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 Socket operation will time out after timeout seconds of inactivity, returning IOErrorEnumTimedOut. On a non-blocking socket, calls to socketConditionWait will also fail with IOErrorEnumTimedOut after the given time. Sources created with g_socket_create_source() will trigger after timeout seconds of inactivity, with the requested condition set, at which point calling socketReceive, socketSend, socketCheckConnectResult, etc, will fail with IOErrorEnumTimedOut. If timeout is 0 (the default), operations will never time out on their own. Note that if an I/O operation is interrupted by a signal, this may cause the timeout to be reset. Since: 2.26
socketSetTtl :: (HasCallStack, MonadIO m, IsSocket a) => a -> Word32 -> m ()gi-gio GI.Gio.Objects.Socket Sets the time-to-live for outgoing unicast packets on socket. By default the platform-specific default value is used. Since: 2.32
socketClientSetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()gi-gio GI.Gio.Objects.SocketClient Sets whether or not client attempts to make connections via a proxy server. When enabled (the default), SocketClient will use a ProxyResolver to determine if a proxy protocol such as SOCKS is needed, and automatically do the necessary proxy negotiation. See also socketClientSetProxyResolver. Since: 2.26
socketClientSetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketFamily -> m ()gi-gio GI.Gio.Objects.SocketClient Sets the socket family of the socket client. If this is set to something other than SocketFamilyInvalid then the sockets created by this object will be of the specified family. This might be useful for instance if you want to force the local connection to be an ipv4 socket, even though the address might be an ipv6 mapped to ipv4 address. Since: 2.22
-
gi-gio GI.Gio.Objects.SocketClient Sets the local address of the socket client. The sockets created by this object will bound to the specified address (if not Nothing) before connecting. This is useful if you want to ensure that the local side of the connection is on a specific port, or on a specific interface. Since: 2.22
-
gi-gio GI.Gio.Objects.SocketClient Sets the protocol of the socket client. The sockets created by this object will use of the specified protocol. If protocol is SocketProtocolDefault that means to use the default protocol for the socket family and type. Since: 2.22
-
gi-gio GI.Gio.Objects.SocketClient Overrides the ProxyResolver used by client. You can call this if you want to use specific proxies, rather than using the system default proxy settings. Note that whether or not the proxy resolver is actually used depends on the setting of SocketClient:enableProxy, which is not changed by this function (but which is True by default) Since: 2.36
socketClientSetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketType -> m ()gi-gio GI.Gio.Objects.SocketClient Sets the socket type of the socket client. The sockets created by this object will be of the specified type. It doesn't make sense to specify a type of SocketTypeDatagram, as GSocketClient is used for connection oriented services. Since: 2.22
socketClientSetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Word32 -> m ()gi-gio GI.Gio.Objects.SocketClient 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 socketClientConnect, etc, to fail with IOErrorEnumTimedOut. Since: 2.26
socketClientSetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()gi-gio GI.Gio.Objects.SocketClient Sets whether client creates TLS (aka SSL) connections. If tls is True, client will wrap its connections in a TlsClientConnection and perform a TLS handshake when connecting. Note that since SocketClient must return a SocketConnection, but TlsClientConnection is not a SocketConnection, this actually wraps the resulting TlsClientConnection in a TcpWrapperConnection when returning it. You can use tcpWrapperConnectionGetBaseIoStream on the return value to extract the TlsClientConnection. If you need to modify the behavior of the TLS handshake (eg, by setting a client-side certificate to use, or connecting to the TlsConnection::acceptCertificate signal), you can connect to client's SocketClient::event signal and wait for it to be emitted with SocketClientEventTlsHandshaking, which will give you a chance to see the TlsClientConnection before the handshake starts. Since: 2.28