Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.SocketClient
Contents
- Exported types
- Methods
- addApplicationProxy
- connect
- connectAsync
- connectFinish
- connectToHost
- connectToHostAsync
- connectToHostFinish
- connectToService
- connectToServiceAsync
- connectToServiceFinish
- connectToUri
- connectToUriAsync
- connectToUriFinish
- getEnableProxy
- getFamily
- getLocalAddress
- getProtocol
- getProxyResolver
- getSocketType
- getTimeout
- getTls
- getTlsValidationFlags
- new
- setEnableProxy
- setFamily
- setLocalAddress
- setProtocol
- setProxyResolver
- setSocketType
- setTimeout
- setTls
- setTlsValidationFlags
- Properties
- Signals
Description
GSocketClient
is a lightweight high-level utility class for connecting to
a network host using a connection oriented socket type.
You create a GSocketClient
object, set any options you want, and then
call a sync or async connect operation, which returns a
SocketConnection
subclass on success.
The type of the SocketConnection
object returned depends on the
type of the underlying socket that is in use. For instance, for a TCP/IP
connection it will be a TcpConnection
.
As GSocketClient
is a lightweight object, you don't need to cache it. You
can just create a new one any time you need one.
Since: 2.22
Synopsis
- newtype SocketClient = SocketClient (ManagedPtr SocketClient)
- class (GObject o, IsDescendantOf SocketClient o) => IsSocketClient o
- toSocketClient :: (MonadIO m, IsSocketClient o) => o -> m SocketClient
- type family ResolveSocketClientMethod (t :: Symbol) o where ...
- data SocketClientAddApplicationProxyMethodInfo
- socketClientAddApplicationProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Text -> m ()
- data SocketClientConnectMethodInfo
- socketClientConnect :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> m SocketConnection
- data SocketClientConnectAsyncMethodInfo
- socketClientConnectAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => a -> b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
- data SocketClientConnectFinishMethodInfo
- socketClientConnectFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
- data SocketClientConnectToHostMethodInfo
- socketClientConnectToHost :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection
- data SocketClientConnectToHostAsyncMethodInfo
- socketClientConnectToHostAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SocketClientConnectToHostFinishMethodInfo
- socketClientConnectToHostFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
- data SocketClientConnectToServiceMethodInfo
- socketClientConnectToService :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> m SocketConnection
- data SocketClientConnectToServiceAsyncMethodInfo
- socketClientConnectToServiceAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SocketClientConnectToServiceFinishMethodInfo
- socketClientConnectToServiceFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
- data SocketClientConnectToUriMethodInfo
- socketClientConnectToUri :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> m SocketConnection
- data SocketClientConnectToUriAsyncMethodInfo
- socketClientConnectToUriAsync :: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) => a -> Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data SocketClientConnectToUriFinishMethodInfo
- socketClientConnectToUriFinish :: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) => a -> b -> m SocketConnection
- data SocketClientGetEnableProxyMethodInfo
- socketClientGetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool
- data SocketClientGetFamilyMethodInfo
- socketClientGetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketFamily
- data SocketClientGetLocalAddressMethodInfo
- socketClientGetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m (Maybe SocketAddress)
- data SocketClientGetProtocolMethodInfo
- socketClientGetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketProtocol
- data SocketClientGetProxyResolverMethodInfo
- socketClientGetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m ProxyResolver
- data SocketClientGetSocketTypeMethodInfo
- socketClientGetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m SocketType
- data SocketClientGetTimeoutMethodInfo
- socketClientGetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Word32
- data SocketClientGetTlsMethodInfo
- socketClientGetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m Bool
- data SocketClientGetTlsValidationFlagsMethodInfo
- socketClientGetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> m [TlsCertificateFlags]
- socketClientNew :: (HasCallStack, MonadIO m) => m SocketClient
- data SocketClientSetEnableProxyMethodInfo
- socketClientSetEnableProxy :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()
- data SocketClientSetFamilyMethodInfo
- socketClientSetFamily :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketFamily -> m ()
- data SocketClientSetLocalAddressMethodInfo
- socketClientSetLocalAddress :: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketAddress b) => a -> Maybe b -> m ()
- data SocketClientSetProtocolMethodInfo
- socketClientSetProtocol :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketProtocol -> m ()
- data SocketClientSetProxyResolverMethodInfo
- socketClientSetProxyResolver :: (HasCallStack, MonadIO m, IsSocketClient a, IsProxyResolver b) => a -> Maybe b -> m ()
- data SocketClientSetSocketTypeMethodInfo
- socketClientSetSocketType :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> SocketType -> m ()
- data SocketClientSetTimeoutMethodInfo
- socketClientSetTimeout :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Word32 -> m ()
- data SocketClientSetTlsMethodInfo
- socketClientSetTls :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> Bool -> m ()
- data SocketClientSetTlsValidationFlagsMethodInfo
- socketClientSetTlsValidationFlags :: (HasCallStack, MonadIO m, IsSocketClient a) => a -> [TlsCertificateFlags] -> m ()
- data SocketClientEnableProxyPropertyInfo
- constructSocketClientEnableProxy :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> m Bool
- setSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()
- socketClientEnableProxy :: AttrLabelProxy "enableProxy"
- data SocketClientFamilyPropertyInfo
- constructSocketClientFamily :: (IsSocketClient o, MonadIO m) => SocketFamily -> m (GValueConstruct o)
- getSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> m SocketFamily
- setSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> SocketFamily -> m ()
- socketClientFamily :: AttrLabelProxy "family"
- data SocketClientLocalAddressPropertyInfo
- clearSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m ()
- constructSocketClientLocalAddress :: (IsSocketClient o, MonadIO m, IsSocketAddress a) => a -> m (GValueConstruct o)
- getSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m (Maybe SocketAddress)
- setSocketClientLocalAddress :: (MonadIO m, IsSocketClient o, IsSocketAddress a) => o -> a -> m ()
- socketClientLocalAddress :: AttrLabelProxy "localAddress"
- data SocketClientProtocolPropertyInfo
- constructSocketClientProtocol :: (IsSocketClient o, MonadIO m) => SocketProtocol -> m (GValueConstruct o)
- getSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> m SocketProtocol
- setSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> SocketProtocol -> m ()
- socketClientProtocol :: AttrLabelProxy "protocol"
- data SocketClientProxyResolverPropertyInfo
- clearSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ()
- constructSocketClientProxyResolver :: (IsSocketClient o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o)
- getSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ProxyResolver
- setSocketClientProxyResolver :: (MonadIO m, IsSocketClient o, IsProxyResolver a) => o -> a -> m ()
- socketClientProxyResolver :: AttrLabelProxy "proxyResolver"
- data SocketClientTimeoutPropertyInfo
- constructSocketClientTimeout :: (IsSocketClient o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> m Word32
- setSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> Word32 -> m ()
- socketClientTimeout :: AttrLabelProxy "timeout"
- data SocketClientTlsPropertyInfo
- constructSocketClientTls :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o)
- getSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> m Bool
- setSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> Bool -> m ()
- socketClientTls :: AttrLabelProxy "tls"
- data SocketClientTlsValidationFlagsPropertyInfo
- constructSocketClientTlsValidationFlags :: (IsSocketClient o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o)
- getSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> m [TlsCertificateFlags]
- setSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> [TlsCertificateFlags] -> m ()
- socketClientTlsValidationFlags :: AttrLabelProxy "tlsValidationFlags"
- data SocketClientTypePropertyInfo
- constructSocketClientType :: (IsSocketClient o, MonadIO m) => SocketType -> m (GValueConstruct o)
- getSocketClientType :: (MonadIO m, IsSocketClient o) => o -> m SocketType
- setSocketClientType :: (MonadIO m, IsSocketClient o) => o -> SocketType -> m ()
- socketClientType :: AttrLabelProxy "type"
- type SocketClientEventCallback = SocketClientEvent -> SocketConnectable -> Maybe IOStream -> IO ()
- data SocketClientEventSignalInfo
- afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId
- onSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId
Exported types
newtype SocketClient Source #
Memory-managed wrapper type.
Constructors
SocketClient (ManagedPtr SocketClient) |
Instances
class (GObject o, IsDescendantOf SocketClient o) => IsSocketClient o Source #
Type class for types which can be safely cast to SocketClient
, for instance with toSocketClient
.
Instances
(GObject o, IsDescendantOf SocketClient o) => IsSocketClient o Source # | |
Defined in GI.Gio.Objects.SocketClient |
toSocketClient :: (MonadIO m, IsSocketClient o) => o -> m SocketClient Source #
Cast to SocketClient
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addApplicationProxy, bindProperty, bindPropertyFull, connect, connectAsync, connectFinish, connectToHost, connectToHostAsync, connectToHostFinish, connectToService, connectToServiceAsync, connectToServiceFinish, connectToUri, connectToUriAsync, connectToUriFinish, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getEnableProxy, getFamily, getLocalAddress, getProperty, getProtocol, getProxyResolver, getQdata, getSocketType, getTimeout, getTls, getTlsValidationFlags.
Setters
setData, setDataFull, setEnableProxy, setFamily, setLocalAddress, setProperty, setProtocol, setProxyResolver, setSocketType, setTimeout, setTls, setTlsValidationFlags.
type family ResolveSocketClientMethod (t :: Symbol) o where ... Source #
Equations
addApplicationProxy
data SocketClientAddApplicationProxyMethodInfo Source #
Instances
(signature ~ (Text -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientAddApplicationProxyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientAddApplicationProxyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientAddApplicationProxy Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> Text |
|
-> m () |
Enable proxy protocols to be handled by the application. When the
indicated proxy protocol is returned by the ProxyResolver
,
SocketClient
will consider this protocol as supported but will
not try to find a Proxy
instance to handle handshaking. The
application must check for this case by calling
socketConnectionGetRemoteAddress
on the returned
SocketConnection
, and seeing if it's a ProxyAddress
of the
appropriate type, to determine whether or not it needs to handle
the proxy handshaking itself.
This should be used for proxy protocols that are dialects of another protocol such as HTTP proxy. It also allows cohabitation of proxy protocols that are reused between protocols. A good example is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also be use as generic socket proxy through the HTTP CONNECT method.
When the proxy is detected as being an application proxy, TLS handshake will be skipped. This is required to let the application do the proxy specific handshake.
connect
data SocketClientConnectMethodInfo Source #
Instances
(signature ~ (b -> Maybe c -> m SocketConnection), MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => OverloadedMethod SocketClientConnectMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m SocketConnection | Returns: a |
Tries to resolve the connectable
and make a network connection to it.
Upon a successful connection, a new SocketConnection
is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.
The type of the SocketConnection
object returned depends on the type of
the underlying socket that is used. For instance, for a TCP/IP connection
it will be a TcpConnection
.
The socket created will be the same family as the address that the
connectable
resolves to, unless family is set with socketClientSetFamily
or indirectly via socketClientSetLocalAddress
. The socket type
defaults to SocketTypeStream
but can be set with
socketClientSetSocketType
.
If a local address is specified with socketClientSetLocalAddress
the
socket will be bound to this address before connecting.
Since: 2.22
connectAsync
data SocketClientConnectAsyncMethodInfo Source #
Instances
(signature ~ (b -> Maybe c -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) => OverloadedMethod SocketClientConnectAsyncMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectAsyncMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketConnectable b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
This is the asynchronous version of socketClientConnect
.
You may wish to prefer the asynchronous version even in synchronous command line programs because, since 2.60, it implements RFC 8305 "Happy Eyeballs" recommendations to work around long connection timeouts in networks where IPv6 is broken by performing an IPv4 connection simultaneously without waiting for IPv6 to time out, which is not supported by the synchronous call. (This is not an API guarantee, and may change in the future.)
When the operation is finished callback
will be
called. You can then call socketClientConnectFinish
to get
the result of the operation.
Since: 2.22
connectFinish
data SocketClientConnectFinishMethodInfo Source #
Instances
(signature ~ (b -> m SocketConnection), MonadIO m, IsSocketClient a, IsAsyncResult b) => OverloadedMethod SocketClientConnectFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m SocketConnection | Returns: a |
Finishes an async connect operation. See socketClientConnectAsync
Since: 2.22
connectToHost
data SocketClientConnectToHostMethodInfo Source #
Instances
(signature ~ (Text -> Word16 -> Maybe b -> m SocketConnection), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToHostMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToHostMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToHost Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Word16 |
|
-> Maybe b |
|
-> m SocketConnection | Returns: a |
This is a helper function for socketClientConnect
.
Attempts to create a TCP connection to the named host.
hostAndPort
may be in any of a number of recognized formats; an IPv6
address, an IPv4 address, or a domain name (in which case a DNS
lookup is performed). Quoting with [] is supported for all address
types. A port override may be specified in the usual way with a
colon. Ports may be given as decimal numbers or symbolic names (in
which case an /etc/services lookup is performed).
If no port override is given in hostAndPort
then defaultPort
will be
used as the port number to connect to.
In general, hostAndPort
is expected to be provided by the user (allowing
them to give the hostname, and a port override if necessary) and
defaultPort
is expected to be provided by the application.
In the case that an IP address is given, a single connection attempt is made. In the case that a name is given, multiple connection attempts may be made, in turn and according to the number of address records in DNS, until a connection succeeds.
Upon a successful connection, a new SocketConnection
is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.
In the event of any failure (DNS error, service not found, no hosts
connectable) Nothing
is returned and error
(if non-Nothing
) is set
accordingly.
Since: 2.22
connectToHostAsync
data SocketClientConnectToHostAsyncMethodInfo Source #
Instances
(signature ~ (Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToHostAsyncMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToHostAsyncMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToHostAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Word16 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
This is the asynchronous version of socketClientConnectToHost
.
When the operation is finished callback
will be
called. You can then call socketClientConnectToHostFinish
to get
the result of the operation.
Since: 2.22
connectToHostFinish
data SocketClientConnectToHostFinishMethodInfo Source #
Instances
(signature ~ (b -> m SocketConnection), MonadIO m, IsSocketClient a, IsAsyncResult b) => OverloadedMethod SocketClientConnectToHostFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToHostFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToHostFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m SocketConnection | Returns: a |
Finishes an async connect operation. See socketClientConnectToHostAsync
Since: 2.22
connectToService
data SocketClientConnectToServiceMethodInfo Source #
Instances
(signature ~ (Text -> Text -> Maybe b -> m SocketConnection), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToServiceMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToServiceMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToService Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> m SocketConnection | Returns: a |
Attempts to create a TCP connection to a service.
This call looks up the SRV record for service
at domain
for the
"tcp" protocol. It then attempts to connect, in turn, to each of
the hosts providing the service until either a connection succeeds
or there are no hosts remaining.
Upon a successful connection, a new SocketConnection
is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.
In the event of any failure (DNS error, service not found, no hosts
connectable) Nothing
is returned and error
(if non-Nothing
) is set
accordingly.
connectToServiceAsync
data SocketClientConnectToServiceAsyncMethodInfo Source #
Instances
(signature ~ (Text -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToServiceAsyncMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToServiceAsyncMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToServiceAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Text |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
This is the asynchronous version of
socketClientConnectToService
.
Since: 2.22
connectToServiceFinish
data SocketClientConnectToServiceFinishMethodInfo Source #
Instances
(signature ~ (b -> m SocketConnection), MonadIO m, IsSocketClient a, IsAsyncResult b) => OverloadedMethod SocketClientConnectToServiceFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToServiceFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToServiceFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m SocketConnection | Returns: a |
Finishes an async connect operation. See socketClientConnectToServiceAsync
Since: 2.22
connectToUri
data SocketClientConnectToUriMethodInfo Source #
Instances
(signature ~ (Text -> Word16 -> Maybe b -> m SocketConnection), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToUriMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToUriMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToUri Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Word16 |
|
-> Maybe b |
|
-> m SocketConnection | Returns: a |
This is a helper function for socketClientConnect
.
Attempts to create a TCP connection with a network URI.
uri
may be any valid URI containing an "authority" (hostname/port)
component. If a port is not specified in the URI, defaultPort
will be used. TLS will be negotiated if SocketClient:tls is True
.
(tSocketClient
does not know to automatically assume TLS for
certain URI schemes.)
Using this rather than socketClientConnect
or
socketClientConnectToHost
allows SocketClient
to
determine when to use application-specific proxy protocols.
Upon a successful connection, a new SocketConnection
is constructed
and returned. The caller owns this new object and must drop their
reference to it when finished with it.
In the event of any failure (DNS error, service not found, no hosts
connectable) Nothing
is returned and error
(if non-Nothing
) is set
accordingly.
Since: 2.26
connectToUriAsync
data SocketClientConnectToUriAsyncMethodInfo Source #
Instances
(signature ~ (Text -> Word16 -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsSocketClient a, IsCancellable b) => OverloadedMethod SocketClientConnectToUriAsyncMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToUriAsyncMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToUriAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Word16 |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
This is the asynchronous version of socketClientConnectToUri
.
When the operation is finished callback
will be
called. You can then call socketClientConnectToUriFinish
to get
the result of the operation.
Since: 2.26
connectToUriFinish
data SocketClientConnectToUriFinishMethodInfo Source #
Instances
(signature ~ (b -> m SocketConnection), MonadIO m, IsSocketClient a, IsAsyncResult b) => OverloadedMethod SocketClientConnectToUriFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientConnectToUriFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientConnectToUriFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m SocketConnection | Returns: a |
Finishes an async connect operation. See socketClientConnectToUriAsync
Since: 2.26
getEnableProxy
data SocketClientGetEnableProxyMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetEnableProxyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetEnableProxyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetEnableProxy Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m Bool | Returns: whether proxying is enabled |
Gets the proxy enable state; see socketClientSetEnableProxy
Since: 2.26
getFamily
data SocketClientGetFamilyMethodInfo Source #
Instances
(signature ~ m SocketFamily, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetFamilyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetFamilyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetFamily Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m SocketFamily | Returns: a |
getLocalAddress
data SocketClientGetLocalAddressMethodInfo Source #
Instances
(signature ~ m (Maybe SocketAddress), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetLocalAddressMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetLocalAddressMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetLocalAddress Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m (Maybe SocketAddress) | Returns: a |
getProtocol
data SocketClientGetProtocolMethodInfo Source #
Instances
(signature ~ m SocketProtocol, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetProtocolMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetProtocolMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetProtocol Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m SocketProtocol | Returns: a |
Gets the protocol name type of the socket client.
See socketClientSetProtocol
for details.
Since: 2.22
getProxyResolver
data SocketClientGetProxyResolverMethodInfo Source #
Instances
(signature ~ m ProxyResolver, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetProxyResolverMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetProxyResolverMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetProxyResolver Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m ProxyResolver | Returns: The |
Gets the ProxyResolver
being used by client
. Normally, this will
be the resolver returned by proxyResolverGetDefault
, but you
can override it with socketClientSetProxyResolver
.
Since: 2.36
getSocketType
data SocketClientGetSocketTypeMethodInfo Source #
Instances
(signature ~ m SocketType, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetSocketTypeMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetSocketTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetSocketType Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m SocketType | Returns: a |
getTimeout
data SocketClientGetTimeoutMethodInfo Source #
Instances
(signature ~ m Word32, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetTimeoutMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetTimeoutMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetTimeout Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m Word32 | Returns: the timeout in seconds |
Gets the I/O timeout time for sockets created by client
.
See socketClientSetTimeout
for details.
Since: 2.26
getTls
data SocketClientGetTlsMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetTlsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetTlsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether client
creates TLS connections. See
socketClientSetTls
for details.
Since: 2.28
getTlsValidationFlags
data SocketClientGetTlsValidationFlagsMethodInfo Source #
Instances
(signature ~ m [TlsCertificateFlags], MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientGetTlsValidationFlagsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientGetTlsValidationFlagsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientGetTlsValidationFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> m [TlsCertificateFlags] | Returns: the TLS validation flags |
Deprecated: (Since version 2.72)Do not attempt to ignore validation errors.
Gets the TLS validation flags used creating TLS connections via
client
.
This function does not work as originally designed and is impossible to use correctly. See SocketClient:tlsValidationFlags for more information.
Since: 2.28
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> m SocketClient | Returns: a |
Creates a new SocketClient
with the default options.
Since: 2.22
setEnableProxy
data SocketClientSetEnableProxyMethodInfo Source #
Instances
(signature ~ (Bool -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetEnableProxyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetEnableProxyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetEnableProxy Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> Bool |
|
-> m () |
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
setFamily
data SocketClientSetFamilyMethodInfo Source #
Instances
(signature ~ (SocketFamily -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetFamilyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetFamilyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetFamily Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> SocketFamily |
|
-> m () |
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
setLocalAddress
data SocketClientSetLocalAddressMethodInfo Source #
Instances
(signature ~ (Maybe b -> m ()), MonadIO m, IsSocketClient a, IsSocketAddress b) => OverloadedMethod SocketClientSetLocalAddressMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetLocalAddressMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetLocalAddress Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsSocketAddress b) | |
=> a |
|
-> Maybe b |
|
-> m () |
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
setProtocol
data SocketClientSetProtocolMethodInfo Source #
Instances
(signature ~ (SocketProtocol -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetProtocolMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetProtocolMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetProtocol Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> SocketProtocol |
|
-> m () |
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
setProxyResolver
data SocketClientSetProxyResolverMethodInfo Source #
Instances
(signature ~ (Maybe b -> m ()), MonadIO m, IsSocketClient a, IsProxyResolver b) => OverloadedMethod SocketClientSetProxyResolverMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetProxyResolverMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetProxyResolver Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a, IsProxyResolver b) | |
=> a |
|
-> Maybe b |
|
-> m () |
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
setSocketType
data SocketClientSetSocketTypeMethodInfo Source #
Instances
(signature ~ (SocketType -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetSocketTypeMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetSocketTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetSocketType Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> SocketType |
|
-> m () |
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
setTimeout
data SocketClientSetTimeoutMethodInfo Source #
Instances
(signature ~ (Word32 -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetTimeoutMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetTimeoutMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetTimeout Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> Word32 |
|
-> m () |
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
setTls
data SocketClientSetTlsMethodInfo Source #
Instances
(signature ~ (Bool -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetTlsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetTlsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> Bool |
|
-> m () |
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
setTlsValidationFlags
data SocketClientSetTlsValidationFlagsMethodInfo Source #
Instances
(signature ~ ([TlsCertificateFlags] -> m ()), MonadIO m, IsSocketClient a) => OverloadedMethod SocketClientSetTlsValidationFlagsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.SocketClient Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo SocketClientSetTlsValidationFlagsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.SocketClient Methods |
socketClientSetTlsValidationFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsSocketClient a) | |
=> a |
|
-> [TlsCertificateFlags] |
|
-> m () |
Deprecated: (Since version 2.72)Do not attempt to ignore validation errors.
Sets the TLS validation flags used when creating TLS connections
via client
. The default value is TlsCertificateFlagsValidateAll
.
This function does not work as originally designed and is impossible to use correctly. See SocketClient:tlsValidationFlags for more information.
Since: 2.28
Properties
enableProxy
Enable proxy support.
Since: 2.22
data SocketClientEnableProxyPropertyInfo Source #
Instances
constructSocketClientEnableProxy :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “enable-proxy
” property. This is rarely needed directly, but it is used by new
.
getSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> m Bool Source #
Get the value of the “enable-proxy
” property.
When overloading is enabled, this is equivalent to
get
socketClient #enableProxy
setSocketClientEnableProxy :: (MonadIO m, IsSocketClient o) => o -> Bool -> m () Source #
Set the value of the “enable-proxy
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #enableProxy:=
value ]
socketClientEnableProxy :: AttrLabelProxy "enableProxy" Source #
family
The address family to use for socket construction.
Since: 2.22
data SocketClientFamilyPropertyInfo Source #
Instances
AttrInfo SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientFamilyPropertyInfo o => o -> IO (AttrGetType SocketClientFamilyPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientFamilyPropertyInfo o, AttrSetTypeConstraint SocketClientFamilyPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientFamilyPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientFamilyPropertyInfo o, AttrSetTypeConstraint SocketClientFamilyPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientFamilyPropertyInfo o, AttrTransferTypeConstraint SocketClientFamilyPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientFamilyPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientFamilyPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSocketClientFamily :: (IsSocketClient o, MonadIO m) => SocketFamily -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “family
” property. This is rarely needed directly, but it is used by new
.
getSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> m SocketFamily Source #
Get the value of the “family
” property.
When overloading is enabled, this is equivalent to
get
socketClient #family
setSocketClientFamily :: (MonadIO m, IsSocketClient o) => o -> SocketFamily -> m () Source #
Set the value of the “family
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #family:=
value ]
socketClientFamily :: AttrLabelProxy "family" Source #
localAddress
The local address constructed sockets will be bound to.
Since: 2.22
data SocketClientLocalAddressPropertyInfo Source #
Instances
AttrInfo SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo o => o -> IO (AttrGetType SocketClientLocalAddressPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo o, AttrSetTypeConstraint SocketClientLocalAddressPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo o, AttrSetTypeConstraint SocketClientLocalAddressPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo o, AttrTransferTypeConstraint SocketClientLocalAddressPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientLocalAddressPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient type AttrAllowedOps SocketClientLocalAddressPropertyInfo = '['AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear] | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientLocalAddressPropertyInfo Source # | |||||||||||||||||||||||||||||||||
clearSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m () Source #
Set the value of the “local-address
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#localAddress
constructSocketClientLocalAddress :: (IsSocketClient o, MonadIO m, IsSocketAddress a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “local-address
” property. This is rarely needed directly, but it is used by new
.
getSocketClientLocalAddress :: (MonadIO m, IsSocketClient o) => o -> m (Maybe SocketAddress) Source #
Get the value of the “local-address
” property.
When overloading is enabled, this is equivalent to
get
socketClient #localAddress
setSocketClientLocalAddress :: (MonadIO m, IsSocketClient o, IsSocketAddress a) => o -> a -> m () Source #
Set the value of the “local-address
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #localAddress:=
value ]
socketClientLocalAddress :: AttrLabelProxy "localAddress" Source #
protocol
The protocol to use for socket construction, or 0
for default.
Since: 2.22
data SocketClientProtocolPropertyInfo Source #
Instances
AttrInfo SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientProtocolPropertyInfo o => o -> IO (AttrGetType SocketClientProtocolPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientProtocolPropertyInfo o, AttrSetTypeConstraint SocketClientProtocolPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientProtocolPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientProtocolPropertyInfo o, AttrSetTypeConstraint SocketClientProtocolPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientProtocolPropertyInfo o, AttrTransferTypeConstraint SocketClientProtocolPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientProtocolPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSocketClientProtocol :: (IsSocketClient o, MonadIO m) => SocketProtocol -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “protocol
” property. This is rarely needed directly, but it is used by new
.
getSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> m SocketProtocol Source #
Get the value of the “protocol
” property.
When overloading is enabled, this is equivalent to
get
socketClient #protocol
setSocketClientProtocol :: (MonadIO m, IsSocketClient o) => o -> SocketProtocol -> m () Source #
Set the value of the “protocol
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #protocol:=
value ]
socketClientProtocol :: AttrLabelProxy "protocol" Source #
proxyResolver
The proxy resolver to use
Since: 2.36
data SocketClientProxyResolverPropertyInfo Source #
Instances
AttrInfo SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo o => o -> IO (AttrGetType SocketClientProxyResolverPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo o, AttrSetTypeConstraint SocketClientProxyResolverPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo o, AttrSetTypeConstraint SocketClientProxyResolverPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo o, AttrTransferTypeConstraint SocketClientProxyResolverPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientProxyResolverPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient type AttrAllowedOps SocketClientProxyResolverPropertyInfo = '['AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear] | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientProxyResolverPropertyInfo Source # | |||||||||||||||||||||||||||||||||
clearSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m () Source #
Set the value of the “proxy-resolver
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#proxyResolver
constructSocketClientProxyResolver :: (IsSocketClient o, MonadIO m, IsProxyResolver a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “proxy-resolver
” property. This is rarely needed directly, but it is used by new
.
getSocketClientProxyResolver :: (MonadIO m, IsSocketClient o) => o -> m ProxyResolver Source #
Get the value of the “proxy-resolver
” property.
When overloading is enabled, this is equivalent to
get
socketClient #proxyResolver
setSocketClientProxyResolver :: (MonadIO m, IsSocketClient o, IsProxyResolver a) => o -> a -> m () Source #
Set the value of the “proxy-resolver
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #proxyResolver:=
value ]
socketClientProxyResolver :: AttrLabelProxy "proxyResolver" Source #
timeout
The I/O timeout for sockets, in seconds, or 0
for none.
Since: 2.22
data SocketClientTimeoutPropertyInfo Source #
Instances
AttrInfo SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo o => o -> IO (AttrGetType SocketClientTimeoutPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo o, AttrSetTypeConstraint SocketClientTimeoutPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo o, AttrSetTypeConstraint SocketClientTimeoutPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo o, AttrTransferTypeConstraint SocketClientTimeoutPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientTimeoutPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientTimeoutPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSocketClientTimeout :: (IsSocketClient o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “timeout
” property. This is rarely needed directly, but it is used by new
.
getSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> m Word32 Source #
Get the value of the “timeout
” property.
When overloading is enabled, this is equivalent to
get
socketClient #timeout
setSocketClientTimeout :: (MonadIO m, IsSocketClient o) => o -> Word32 -> m () Source #
Set the value of the “timeout
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #timeout:=
value ]
socketClientTimeout :: AttrLabelProxy "timeout" Source #
tls
Whether to create TLS connections.
Since: 2.22
data SocketClientTlsPropertyInfo Source #
Instances
AttrInfo SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientTlsPropertyInfo o => o -> IO (AttrGetType SocketClientTlsPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientTlsPropertyInfo o, AttrSetTypeConstraint SocketClientTlsPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientTlsPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientTlsPropertyInfo o, AttrSetTypeConstraint SocketClientTlsPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientTlsPropertyInfo o, AttrTransferTypeConstraint SocketClientTlsPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientTlsPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientTlsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient |
constructSocketClientTls :: (IsSocketClient o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tls
” property. This is rarely needed directly, but it is used by new
.
getSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> m Bool Source #
Get the value of the “tls
” property.
When overloading is enabled, this is equivalent to
get
socketClient #tls
setSocketClientTls :: (MonadIO m, IsSocketClient o) => o -> Bool -> m () Source #
Set the value of the “tls
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #tls:=
value ]
socketClientTls :: AttrLabelProxy "tls" Source #
tlsValidationFlags
The TLS validation flags used when creating TLS connections. The
default value is TlsCertificateFlagsValidateAll
.
GLib guarantees that if certificate verification fails, at least one
flag will be set, but it does not guarantee that all possible flags
will be set. Accordingly, you may not safely decide to ignore any
particular type of error. For example, it would be incorrect to mask
TlsCertificateFlagsExpired
if you want to allow expired certificates,
because this could potentially be the only error flag set even if
other problems exist with the certificate. Therefore, there is no
safe way to use this property. This is not a horrible problem,
though, because you should not be attempting to ignore validation
errors anyway. If you really must ignore TLS certificate errors,
connect to the SocketClient::event signal, wait for it to be
emitted with SocketClientEventTlsHandshaking
, and use that to
connect to TlsConnection::acceptCertificate.
data SocketClientTlsValidationFlagsPropertyInfo Source #
Instances
AttrInfo SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo o => o -> IO (AttrGetType SocketClientTlsValidationFlagsPropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo o, AttrSetTypeConstraint SocketClientTlsValidationFlagsPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo o, AttrSetTypeConstraint SocketClientTlsValidationFlagsPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo o, AttrTransferTypeConstraint SocketClientTlsValidationFlagsPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientTlsValidationFlagsPropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientTlsValidationFlagsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSocketClientTlsValidationFlags :: (IsSocketClient o, MonadIO m) => [TlsCertificateFlags] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tls-validation-flags
” property. This is rarely needed directly, but it is used by new
.
getSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> m [TlsCertificateFlags] Source #
Get the value of the “tls-validation-flags
” property.
When overloading is enabled, this is equivalent to
get
socketClient #tlsValidationFlags
setSocketClientTlsValidationFlags :: (MonadIO m, IsSocketClient o) => o -> [TlsCertificateFlags] -> m () Source #
Set the value of the “tls-validation-flags
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #tlsValidationFlags:=
value ]
socketClientTlsValidationFlags :: AttrLabelProxy "tlsValidationFlags" Source #
type
The type to use for socket construction.
Since: 2.22
data SocketClientTypePropertyInfo Source #
Instances
AttrInfo SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods attrGet :: AttrBaseTypeConstraint SocketClientTypePropertyInfo o => o -> IO (AttrGetType SocketClientTypePropertyInfo) # attrSet :: (AttrBaseTypeConstraint SocketClientTypePropertyInfo o, AttrSetTypeConstraint SocketClientTypePropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint SocketClientTypePropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint SocketClientTypePropertyInfo o, AttrSetTypeConstraint SocketClientTypePropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint SocketClientTypePropertyInfo o, AttrTransferTypeConstraint SocketClientTypePropertyInfo b) => Proxy o -> b -> IO (AttrTransferType SocketClientTypePropertyInfo) # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrLabel SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrOrigin SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferType SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.SocketClient | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint SocketClientTypePropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructSocketClientType :: (IsSocketClient o, MonadIO m) => SocketType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “type
” property. This is rarely needed directly, but it is used by new
.
getSocketClientType :: (MonadIO m, IsSocketClient o) => o -> m SocketType Source #
Get the value of the “type
” property.
When overloading is enabled, this is equivalent to
get
socketClient #type
setSocketClientType :: (MonadIO m, IsSocketClient o) => o -> SocketType -> m () Source #
Set the value of the “type
” property.
When overloading is enabled, this is equivalent to
set
socketClient [ #type:=
value ]
socketClientType :: AttrLabelProxy "type" Source #
Signals
event
type SocketClientEventCallback Source #
Arguments
= SocketClientEvent |
|
-> SocketConnectable |
|
-> Maybe IOStream |
|
-> IO () |
Emitted when client
's activity on connectable
changes state.
Among other things, this can be used to provide progress
information about a network connection in the UI. The meanings of
the different event
values are as follows:
SocketClientEventResolving
:client
is about to look upconnectable
in DNS.connection
will beNothing
.SocketClientEventResolved
:client
has successfully resolvedconnectable
in DNS.connection
will beNothing
.SocketClientEventConnecting
:client
is about to make a connection to a remote host; either a proxy server or the destination server itself.connection
is theSocketConnection
, which is not yet connected. Since GLib 2.40, you can access the remote address viasocketConnectionGetRemoteAddress
.SocketClientEventConnected
:client
has successfully connected to a remote host.connection
is the connectedSocketConnection
.SocketClientEventProxyNegotiating
:client
is about to negotiate with a proxy to get it to connect toconnectable
.connection
is theSocketConnection
to the proxy server.SocketClientEventProxyNegotiated
:client
has negotiated a connection toconnectable
through a proxy server.connection
is the stream returned fromproxyConnect
, which may or may not be aSocketConnection
.SocketClientEventTlsHandshaking
:client
is about to begin a TLS handshake.connection
is aTlsClientConnection
.SocketClientEventTlsHandshaked
:client
has successfully completed the TLS handshake.connection
is aTlsClientConnection
.SocketClientEventComplete
:client
has either successfully connected toconnectable
(in which caseconnection
is theSocketConnection
that it will be returning to the caller) or has failed (in which caseconnection
isNothing
and the client is about to return an error).
Each event except SocketClientEventComplete
may be emitted
multiple times (or not at all) for a given connectable (in
particular, if client
ends up attempting to connect to more than
one address). However, if client
emits the SocketClient::event
signal at all for a given connectable, then it will always emit
it with SocketClientEventComplete
when it is done.
Note that there may be additional SocketClientEvent
values in
the future; unrecognized event
values should be ignored.
Since: 2.32
data SocketClientEventSignalInfo Source #
Instances
SignalInfo SocketClientEventSignalInfo Source # | |||||
Defined in GI.Gio.Objects.SocketClient Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType SocketClientEventSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType SocketClientEventSignalInfo Source # | |||||
afterSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
socketClient #event callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSocketClientEvent :: (IsSocketClient a, MonadIO m) => a -> ((?self :: a) => SocketClientEventCallback) -> m SignalHandlerId Source #
Connect a signal handler for the event signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
socketClient #event callback