Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype Socket = Socket (ForeignPtr Socket)
- class GObject o => SocketK o
- toSocket :: SocketK o => o -> IO Socket
- noSocket :: Maybe Socket
- data SocketConnectAsyncMethodInfo
- socketConnectAsync :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> SocketCallback -> m ()
- data SocketConnectSyncMethodInfo
- socketConnectSync :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> m Word32
- data SocketDisconnectMethodInfo
- socketDisconnect :: (MonadIO m, SocketK a) => a -> m ()
- data SocketGetFdMethodInfo
- socketGetFd :: (MonadIO m, SocketK a) => a -> m Int32
- data SocketGetLocalAddressMethodInfo
- socketGetLocalAddress :: (MonadIO m, SocketK a) => a -> m Address
- data SocketGetRemoteAddressMethodInfo
- socketGetRemoteAddress :: (MonadIO m, SocketK a) => a -> m Address
- data SocketIsConnectedMethodInfo
- socketIsConnected :: (MonadIO m, SocketK a) => a -> m Bool
- data SocketIsSslMethodInfo
- socketIsSsl :: (MonadIO m, SocketK a) => a -> m Bool
- data SocketListenMethodInfo
- socketListen :: (MonadIO m, SocketK a) => a -> m Bool
- data SocketReadMethodInfo
- socketRead :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Maybe b -> m (SocketIOStatus, Word64)
- data SocketReadUntilMethodInfo
- socketReadUntil :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Ptr () -> Word64 -> Bool -> Maybe b -> m (SocketIOStatus, Word64)
- data SocketStartProxySslMethodInfo
- socketStartProxySsl :: (MonadIO m, SocketK a, CancellableK b) => a -> Text -> Maybe b -> m Bool
- data SocketStartSslMethodInfo
- socketStartSsl :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> m Bool
- data SocketWriteMethodInfo
- socketWrite :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Maybe b -> m (SocketIOStatus, Word64)
- data SocketAsyncContextPropertyInfo
- constructSocketAsyncContext :: Ptr () -> IO ([Char], GValue)
- getSocketAsyncContext :: (MonadIO m, SocketK o) => o -> m (Ptr ())
- socketAsyncContext :: AttrLabelProxy "asyncContext"
- data SocketFdPropertyInfo
- constructSocketFd :: Int32 -> IO ([Char], GValue)
- getSocketFd :: (MonadIO m, SocketK o) => o -> m Int32
- socketFd :: AttrLabelProxy "fd"
- data SocketGsocketPropertyInfo
- constructSocketGsocket :: SocketK a => a -> IO ([Char], GValue)
- socketGsocket :: AttrLabelProxy "gsocket"
- data SocketIostreamPropertyInfo
- constructSocketIostream :: IOStreamK a => a -> IO ([Char], GValue)
- socketIostream :: AttrLabelProxy "iostream"
- data SocketIpv6OnlyPropertyInfo
- constructSocketIpv6Only :: Bool -> IO ([Char], GValue)
- getSocketIpv6Only :: (MonadIO m, SocketK o) => o -> m Bool
- setSocketIpv6Only :: (MonadIO m, SocketK o) => o -> Bool -> m ()
- socketIpv6Only :: AttrLabelProxy "ipv6Only"
- data SocketIsServerPropertyInfo
- getSocketIsServer :: (MonadIO m, SocketK o) => o -> m Bool
- socketIsServer :: AttrLabelProxy "isServer"
- data SocketLocalAddressPropertyInfo
- constructSocketLocalAddress :: AddressK a => a -> IO ([Char], GValue)
- getSocketLocalAddress :: (MonadIO m, SocketK o) => o -> m Address
- socketLocalAddress :: AttrLabelProxy "localAddress"
- data SocketNonBlockingPropertyInfo
- constructSocketNonBlocking :: Bool -> IO ([Char], GValue)
- getSocketNonBlocking :: (MonadIO m, SocketK o) => o -> m Bool
- setSocketNonBlocking :: (MonadIO m, SocketK o) => o -> Bool -> m ()
- socketNonBlocking :: AttrLabelProxy "nonBlocking"
- data SocketRemoteAddressPropertyInfo
- constructSocketRemoteAddress :: AddressK a => a -> IO ([Char], GValue)
- getSocketRemoteAddress :: (MonadIO m, SocketK o) => o -> m Address
- socketRemoteAddress :: AttrLabelProxy "remoteAddress"
- data SocketSslCredsPropertyInfo
- constructSocketSslCreds :: Ptr () -> IO ([Char], GValue)
- getSocketSslCreds :: (MonadIO m, SocketK o) => o -> m (Ptr ())
- setSocketSslCreds :: (MonadIO m, SocketK o) => o -> Ptr () -> m ()
- socketSslCreds :: AttrLabelProxy "sslCreds"
- data SocketSslFallbackPropertyInfo
- constructSocketSslFallback :: Bool -> IO ([Char], GValue)
- getSocketSslFallback :: (MonadIO m, SocketK o) => o -> m Bool
- socketSslFallback :: AttrLabelProxy "sslFallback"
- data SocketSslStrictPropertyInfo
- constructSocketSslStrict :: Bool -> IO ([Char], GValue)
- getSocketSslStrict :: (MonadIO m, SocketK o) => o -> m Bool
- socketSslStrict :: AttrLabelProxy "sslStrict"
- data SocketTimeoutPropertyInfo
- constructSocketTimeout :: Word32 -> IO ([Char], GValue)
- getSocketTimeout :: (MonadIO m, SocketK o) => o -> m Word32
- setSocketTimeout :: (MonadIO m, SocketK o) => o -> Word32 -> m ()
- socketTimeout :: AttrLabelProxy "timeout"
- data SocketTlsCertificatePropertyInfo
- getSocketTlsCertificate :: (MonadIO m, SocketK o) => o -> m (Maybe TlsCertificate)
- socketTlsCertificate :: AttrLabelProxy "tlsCertificate"
- data SocketTlsErrorsPropertyInfo
- getSocketTlsErrors :: (MonadIO m, SocketK o) => o -> m [TlsCertificateFlags]
- socketTlsErrors :: AttrLabelProxy "tlsErrors"
- data SocketTrustedCertificatePropertyInfo
- getSocketTrustedCertificate :: (MonadIO m, SocketK o) => o -> m Bool
- socketTrustedCertificate :: AttrLabelProxy "trustedCertificate"
- data SocketUseThreadContextPropertyInfo
- constructSocketUseThreadContext :: Bool -> IO ([Char], GValue)
- getSocketUseThreadContext :: (MonadIO m, SocketK o) => o -> m Bool
- socketUseThreadContext :: AttrLabelProxy "useThreadContext"
- type SocketDisconnectedCallback = IO ()
- type SocketDisconnectedCallbackC = Ptr () -> Ptr () -> IO ()
- data SocketDisconnectedSignalInfo
- afterSocketDisconnected :: (GObject a, MonadIO m) => a -> SocketDisconnectedCallback -> m SignalHandlerId
- mkSocketDisconnectedCallback :: SocketDisconnectedCallbackC -> IO (FunPtr SocketDisconnectedCallbackC)
- noSocketDisconnectedCallback :: Maybe SocketDisconnectedCallback
- onSocketDisconnected :: (GObject a, MonadIO m) => a -> SocketDisconnectedCallback -> m SignalHandlerId
- socketDisconnectedCallbackWrapper :: SocketDisconnectedCallback -> Ptr () -> Ptr () -> IO ()
- socketDisconnectedClosure :: SocketDisconnectedCallback -> IO Closure
- type SocketEventCallback = SocketClientEvent -> IOStream -> IO ()
- type SocketEventCallbackC = Ptr () -> CUInt -> Ptr IOStream -> Ptr () -> IO ()
- data SocketEventSignalInfo
- afterSocketEvent :: (GObject a, MonadIO m) => a -> SocketEventCallback -> m SignalHandlerId
- mkSocketEventCallback :: SocketEventCallbackC -> IO (FunPtr SocketEventCallbackC)
- noSocketEventCallback :: Maybe SocketEventCallback
- onSocketEvent :: (GObject a, MonadIO m) => a -> SocketEventCallback -> m SignalHandlerId
- socketEventCallbackWrapper :: SocketEventCallback -> Ptr () -> CUInt -> Ptr IOStream -> Ptr () -> IO ()
- socketEventClosure :: SocketEventCallback -> IO Closure
- type SocketNewConnectionCallback = Socket -> IO ()
- type SocketNewConnectionCallbackC = Ptr () -> Ptr Socket -> Ptr () -> IO ()
- data SocketNewConnectionSignalInfo
- afterSocketNewConnection :: (GObject a, MonadIO m) => a -> SocketNewConnectionCallback -> m SignalHandlerId
- mkSocketNewConnectionCallback :: SocketNewConnectionCallbackC -> IO (FunPtr SocketNewConnectionCallbackC)
- noSocketNewConnectionCallback :: Maybe SocketNewConnectionCallback
- onSocketNewConnection :: (GObject a, MonadIO m) => a -> SocketNewConnectionCallback -> m SignalHandlerId
- socketNewConnectionCallbackWrapper :: SocketNewConnectionCallback -> Ptr () -> Ptr Socket -> Ptr () -> IO ()
- socketNewConnectionClosure :: SocketNewConnectionCallback -> IO Closure
- type SocketReadableCallback = IO ()
- type SocketReadableCallbackC = Ptr () -> Ptr () -> IO ()
- data SocketReadableSignalInfo
- afterSocketReadable :: (GObject a, MonadIO m) => a -> SocketReadableCallback -> m SignalHandlerId
- mkSocketReadableCallback :: SocketReadableCallbackC -> IO (FunPtr SocketReadableCallbackC)
- noSocketReadableCallback :: Maybe SocketReadableCallback
- onSocketReadable :: (GObject a, MonadIO m) => a -> SocketReadableCallback -> m SignalHandlerId
- socketReadableCallbackWrapper :: SocketReadableCallback -> Ptr () -> Ptr () -> IO ()
- socketReadableClosure :: SocketReadableCallback -> IO Closure
- type SocketWritableCallback = IO ()
- type SocketWritableCallbackC = Ptr () -> Ptr () -> IO ()
- data SocketWritableSignalInfo
- afterSocketWritable :: (GObject a, MonadIO m) => a -> SocketWritableCallback -> m SignalHandlerId
- mkSocketWritableCallback :: SocketWritableCallbackC -> IO (FunPtr SocketWritableCallbackC)
- noSocketWritableCallback :: Maybe SocketWritableCallback
- onSocketWritable :: (GObject a, MonadIO m) => a -> SocketWritableCallback -> m SignalHandlerId
- socketWritableCallbackWrapper :: SocketWritableCallback -> Ptr () -> Ptr () -> IO ()
- socketWritableClosure :: SocketWritableCallback -> IO Closure
Exported types
GObject Socket | |
((~) * info (ResolveSocketMethod t Socket), MethodInfo * info Socket p) => IsLabelProxy t (Socket -> p) | |
type ParentTypes Socket | |
type AttributeList Socket | |
type SignalList Socket |
Methods
socketConnectAsync
data SocketConnectAsyncMethodInfo Source
((~) * signature (Maybe b -> SocketCallback -> m ()), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketConnectAsyncMethodInfo a signature |
socketConnectAsync :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> SocketCallback -> m () Source
socketConnectSync
data SocketConnectSyncMethodInfo Source
((~) * signature (Maybe b -> m Word32), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketConnectSyncMethodInfo a signature |
socketConnectSync :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> m Word32 Source
socketDisconnect
data SocketDisconnectMethodInfo Source
((~) * signature (m ()), MonadIO m, SocketK a) => MethodInfo * SocketDisconnectMethodInfo a signature |
socketDisconnect :: (MonadIO m, SocketK a) => a -> m () Source
socketGetFd
data SocketGetFdMethodInfo Source
((~) * signature (m Int32), MonadIO m, SocketK a) => MethodInfo * SocketGetFdMethodInfo a signature |
socketGetFd :: (MonadIO m, SocketK a) => a -> m Int32 Source
socketGetLocalAddress
data SocketGetLocalAddressMethodInfo Source
((~) * signature (m Address), MonadIO m, SocketK a) => MethodInfo * SocketGetLocalAddressMethodInfo a signature |
socketGetLocalAddress :: (MonadIO m, SocketK a) => a -> m Address Source
socketGetRemoteAddress
data SocketGetRemoteAddressMethodInfo Source
((~) * signature (m Address), MonadIO m, SocketK a) => MethodInfo * SocketGetRemoteAddressMethodInfo a signature |
socketGetRemoteAddress :: (MonadIO m, SocketK a) => a -> m Address Source
socketIsConnected
data SocketIsConnectedMethodInfo Source
((~) * signature (m Bool), MonadIO m, SocketK a) => MethodInfo * SocketIsConnectedMethodInfo a signature |
socketIsConnected :: (MonadIO m, SocketK a) => a -> m Bool Source
socketIsSsl
data SocketIsSslMethodInfo Source
((~) * signature (m Bool), MonadIO m, SocketK a) => MethodInfo * SocketIsSslMethodInfo a signature |
socketIsSsl :: (MonadIO m, SocketK a) => a -> m Bool Source
socketListen
data SocketListenMethodInfo Source
((~) * signature (m Bool), MonadIO m, SocketK a) => MethodInfo * SocketListenMethodInfo a signature |
socketListen :: (MonadIO m, SocketK a) => a -> m Bool Source
socketRead
data SocketReadMethodInfo Source
((~) * signature (ByteString -> Maybe b -> m (SocketIOStatus, Word64)), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketReadMethodInfo a signature |
socketRead :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Maybe b -> m (SocketIOStatus, Word64) Source
socketReadUntil
data SocketReadUntilMethodInfo Source
((~) * signature (ByteString -> Ptr () -> Word64 -> Bool -> Maybe b -> m (SocketIOStatus, Word64)), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketReadUntilMethodInfo a signature |
socketReadUntil :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Ptr () -> Word64 -> Bool -> Maybe b -> m (SocketIOStatus, Word64) Source
socketStartProxySsl
data SocketStartProxySslMethodInfo Source
((~) * signature (Text -> Maybe b -> m Bool), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketStartProxySslMethodInfo a signature |
socketStartProxySsl :: (MonadIO m, SocketK a, CancellableK b) => a -> Text -> Maybe b -> m Bool Source
socketStartSsl
data SocketStartSslMethodInfo Source
((~) * signature (Maybe b -> m Bool), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketStartSslMethodInfo a signature |
socketStartSsl :: (MonadIO m, SocketK a, CancellableK b) => a -> Maybe b -> m Bool Source
socketWrite
data SocketWriteMethodInfo Source
((~) * signature (ByteString -> Maybe b -> m (SocketIOStatus, Word64)), MonadIO m, SocketK a, CancellableK b) => MethodInfo * SocketWriteMethodInfo a signature |
socketWrite :: (MonadIO m, SocketK a, CancellableK b) => a -> ByteString -> Maybe b -> m (SocketIOStatus, Word64) Source
Properties
AsyncContext
data SocketAsyncContextPropertyInfo Source
AttrInfo SocketAsyncContextPropertyInfo | |
type AttrLabel SocketAsyncContextPropertyInfo = "async-context" | |
type AttrGetType SocketAsyncContextPropertyInfo = Ptr () | |
type AttrBaseTypeConstraint SocketAsyncContextPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketAsyncContextPropertyInfo = * ~ Ptr () | |
type AttrAllowedOps SocketAsyncContextPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag)) |
getSocketAsyncContext :: (MonadIO m, SocketK o) => o -> m (Ptr ()) Source
socketAsyncContext :: AttrLabelProxy "asyncContext" Source
Fd
data SocketFdPropertyInfo Source
AttrInfo SocketFdPropertyInfo | |
type AttrLabel SocketFdPropertyInfo = "fd" | |
type AttrGetType SocketFdPropertyInfo = Int32 | |
type AttrBaseTypeConstraint SocketFdPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketFdPropertyInfo = * ~ Int32 | |
type AttrAllowedOps SocketFdPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag)) |
getSocketFd :: (MonadIO m, SocketK o) => o -> m Int32 Source
socketFd :: AttrLabelProxy "fd" Source
Gsocket
data SocketGsocketPropertyInfo Source
AttrInfo SocketGsocketPropertyInfo | |
type AttrLabel SocketGsocketPropertyInfo = "gsocket" | |
type AttrGetType SocketGsocketPropertyInfo = () | |
type AttrBaseTypeConstraint SocketGsocketPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketGsocketPropertyInfo = SocketK | |
type AttrAllowedOps SocketGsocketPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrClear ([] AttrOpTag)) |
socketGsocket :: AttrLabelProxy "gsocket" Source
Iostream
data SocketIostreamPropertyInfo Source
AttrInfo SocketIostreamPropertyInfo | |
type AttrLabel SocketIostreamPropertyInfo = "iostream" | |
type AttrGetType SocketIostreamPropertyInfo = () | |
type AttrBaseTypeConstraint SocketIostreamPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketIostreamPropertyInfo = IOStreamK | |
type AttrAllowedOps SocketIostreamPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrClear ([] AttrOpTag)) |
socketIostream :: AttrLabelProxy "iostream" Source
Ipv6Only
data SocketIpv6OnlyPropertyInfo Source
AttrInfo SocketIpv6OnlyPropertyInfo | |
type AttrLabel SocketIpv6OnlyPropertyInfo = "ipv6-only" | |
type AttrGetType SocketIpv6OnlyPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketIpv6OnlyPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketIpv6OnlyPropertyInfo = * ~ Bool | |
type AttrAllowedOps SocketIpv6OnlyPropertyInfo = (:) AttrOpTag AttrSet ((:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag))) |
getSocketIpv6Only :: (MonadIO m, SocketK o) => o -> m Bool Source
setSocketIpv6Only :: (MonadIO m, SocketK o) => o -> Bool -> m () Source
socketIpv6Only :: AttrLabelProxy "ipv6Only" Source
IsServer
data SocketIsServerPropertyInfo Source
AttrInfo SocketIsServerPropertyInfo | |
type AttrLabel SocketIsServerPropertyInfo = "is-server" | |
type AttrGetType SocketIsServerPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketIsServerPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketIsServerPropertyInfo = * ~ () | |
type AttrAllowedOps SocketIsServerPropertyInfo = (:) AttrOpTag AttrGet ([] AttrOpTag) |
getSocketIsServer :: (MonadIO m, SocketK o) => o -> m Bool Source
socketIsServer :: AttrLabelProxy "isServer" Source
LocalAddress
data SocketLocalAddressPropertyInfo Source
AttrInfo SocketLocalAddressPropertyInfo | |
type AttrLabel SocketLocalAddressPropertyInfo = "local-address" | |
type AttrGetType SocketLocalAddressPropertyInfo = Address | |
type AttrBaseTypeConstraint SocketLocalAddressPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketLocalAddressPropertyInfo = AddressK | |
type AttrAllowedOps SocketLocalAddressPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ((:) AttrOpTag AttrClear ([] AttrOpTag))) |
getSocketLocalAddress :: (MonadIO m, SocketK o) => o -> m Address Source
socketLocalAddress :: AttrLabelProxy "localAddress" Source
NonBlocking
data SocketNonBlockingPropertyInfo Source
AttrInfo SocketNonBlockingPropertyInfo | |
type AttrLabel SocketNonBlockingPropertyInfo = "non-blocking" | |
type AttrGetType SocketNonBlockingPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketNonBlockingPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketNonBlockingPropertyInfo = * ~ Bool | |
type AttrAllowedOps SocketNonBlockingPropertyInfo = (:) AttrOpTag AttrSet ((:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag))) |
getSocketNonBlocking :: (MonadIO m, SocketK o) => o -> m Bool Source
setSocketNonBlocking :: (MonadIO m, SocketK o) => o -> Bool -> m () Source
socketNonBlocking :: AttrLabelProxy "nonBlocking" Source
RemoteAddress
data SocketRemoteAddressPropertyInfo Source
AttrInfo SocketRemoteAddressPropertyInfo | |
type AttrLabel SocketRemoteAddressPropertyInfo = "remote-address" | |
type AttrGetType SocketRemoteAddressPropertyInfo = Address | |
type AttrBaseTypeConstraint SocketRemoteAddressPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketRemoteAddressPropertyInfo = AddressK | |
type AttrAllowedOps SocketRemoteAddressPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ((:) AttrOpTag AttrClear ([] AttrOpTag))) |
getSocketRemoteAddress :: (MonadIO m, SocketK o) => o -> m Address Source
socketRemoteAddress :: AttrLabelProxy "remoteAddress" Source
SslCreds
data SocketSslCredsPropertyInfo Source
AttrInfo SocketSslCredsPropertyInfo | |
type AttrLabel SocketSslCredsPropertyInfo = "ssl-creds" | |
type AttrGetType SocketSslCredsPropertyInfo = Ptr () | |
type AttrBaseTypeConstraint SocketSslCredsPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketSslCredsPropertyInfo = * ~ Ptr () | |
type AttrAllowedOps SocketSslCredsPropertyInfo = (:) AttrOpTag AttrSet ((:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag))) |
getSocketSslCreds :: (MonadIO m, SocketK o) => o -> m (Ptr ()) Source
setSocketSslCreds :: (MonadIO m, SocketK o) => o -> Ptr () -> m () Source
socketSslCreds :: AttrLabelProxy "sslCreds" Source
SslFallback
data SocketSslFallbackPropertyInfo Source
AttrInfo SocketSslFallbackPropertyInfo | |
type AttrLabel SocketSslFallbackPropertyInfo = "ssl-fallback" | |
type AttrGetType SocketSslFallbackPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketSslFallbackPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketSslFallbackPropertyInfo = * ~ Bool | |
type AttrAllowedOps SocketSslFallbackPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag)) |
getSocketSslFallback :: (MonadIO m, SocketK o) => o -> m Bool Source
socketSslFallback :: AttrLabelProxy "sslFallback" Source
SslStrict
data SocketSslStrictPropertyInfo Source
AttrInfo SocketSslStrictPropertyInfo | |
type AttrLabel SocketSslStrictPropertyInfo = "ssl-strict" | |
type AttrGetType SocketSslStrictPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketSslStrictPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketSslStrictPropertyInfo = * ~ Bool | |
type AttrAllowedOps SocketSslStrictPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag)) |
getSocketSslStrict :: (MonadIO m, SocketK o) => o -> m Bool Source
socketSslStrict :: AttrLabelProxy "sslStrict" Source
Timeout
data SocketTimeoutPropertyInfo Source
AttrInfo SocketTimeoutPropertyInfo | |
type AttrLabel SocketTimeoutPropertyInfo = "timeout" | |
type AttrGetType SocketTimeoutPropertyInfo = Word32 | |
type AttrBaseTypeConstraint SocketTimeoutPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketTimeoutPropertyInfo = * ~ Word32 | |
type AttrAllowedOps SocketTimeoutPropertyInfo = (:) AttrOpTag AttrSet ((:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag))) |
getSocketTimeout :: (MonadIO m, SocketK o) => o -> m Word32 Source
setSocketTimeout :: (MonadIO m, SocketK o) => o -> Word32 -> m () Source
socketTimeout :: AttrLabelProxy "timeout" Source
TlsCertificate
data SocketTlsCertificatePropertyInfo Source
AttrInfo SocketTlsCertificatePropertyInfo | |
type AttrLabel SocketTlsCertificatePropertyInfo = "tls-certificate" | |
type AttrGetType SocketTlsCertificatePropertyInfo = Maybe TlsCertificate | |
type AttrBaseTypeConstraint SocketTlsCertificatePropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketTlsCertificatePropertyInfo = * ~ () | |
type AttrAllowedOps SocketTlsCertificatePropertyInfo = (:) AttrOpTag AttrGet ((:) AttrOpTag AttrClear ([] AttrOpTag)) |
getSocketTlsCertificate :: (MonadIO m, SocketK o) => o -> m (Maybe TlsCertificate) Source
socketTlsCertificate :: AttrLabelProxy "tlsCertificate" Source
TlsErrors
data SocketTlsErrorsPropertyInfo Source
AttrInfo SocketTlsErrorsPropertyInfo | |
type AttrLabel SocketTlsErrorsPropertyInfo = "tls-errors" | |
type AttrGetType SocketTlsErrorsPropertyInfo = [TlsCertificateFlags] | |
type AttrBaseTypeConstraint SocketTlsErrorsPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketTlsErrorsPropertyInfo = * ~ () | |
type AttrAllowedOps SocketTlsErrorsPropertyInfo = (:) AttrOpTag AttrGet ([] AttrOpTag) |
getSocketTlsErrors :: (MonadIO m, SocketK o) => o -> m [TlsCertificateFlags] Source
socketTlsErrors :: AttrLabelProxy "tlsErrors" Source
TrustedCertificate
data SocketTrustedCertificatePropertyInfo Source
AttrInfo SocketTrustedCertificatePropertyInfo | |
type AttrLabel SocketTrustedCertificatePropertyInfo = "trusted-certificate" | |
type AttrGetType SocketTrustedCertificatePropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketTrustedCertificatePropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketTrustedCertificatePropertyInfo = * ~ () | |
type AttrAllowedOps SocketTrustedCertificatePropertyInfo = (:) AttrOpTag AttrGet ([] AttrOpTag) |
getSocketTrustedCertificate :: (MonadIO m, SocketK o) => o -> m Bool Source
socketTrustedCertificate :: AttrLabelProxy "trustedCertificate" Source
UseThreadContext
data SocketUseThreadContextPropertyInfo Source
AttrInfo SocketUseThreadContextPropertyInfo | |
type AttrLabel SocketUseThreadContextPropertyInfo = "use-thread-context" | |
type AttrGetType SocketUseThreadContextPropertyInfo = Bool | |
type AttrBaseTypeConstraint SocketUseThreadContextPropertyInfo = SocketK | |
type AttrSetTypeConstraint SocketUseThreadContextPropertyInfo = * ~ Bool | |
type AttrAllowedOps SocketUseThreadContextPropertyInfo = (:) AttrOpTag AttrConstruct ((:) AttrOpTag AttrGet ([] AttrOpTag)) |
getSocketUseThreadContext :: (MonadIO m, SocketK o) => o -> m Bool Source
socketUseThreadContext :: AttrLabelProxy "useThreadContext" Source
Signals
Disconnected
type SocketDisconnectedCallback = IO () Source
type SocketDisconnectedCallbackC = Ptr () -> Ptr () -> IO () Source
afterSocketDisconnected :: (GObject a, MonadIO m) => a -> SocketDisconnectedCallback -> m SignalHandlerId Source
mkSocketDisconnectedCallback :: SocketDisconnectedCallbackC -> IO (FunPtr SocketDisconnectedCallbackC) Source
onSocketDisconnected :: (GObject a, MonadIO m) => a -> SocketDisconnectedCallback -> m SignalHandlerId Source
socketDisconnectedCallbackWrapper :: SocketDisconnectedCallback -> Ptr () -> Ptr () -> IO () Source
Event
type SocketEventCallback = SocketClientEvent -> IOStream -> IO () Source
afterSocketEvent :: (GObject a, MonadIO m) => a -> SocketEventCallback -> m SignalHandlerId Source
onSocketEvent :: (GObject a, MonadIO m) => a -> SocketEventCallback -> m SignalHandlerId Source
socketEventCallbackWrapper :: SocketEventCallback -> Ptr () -> CUInt -> Ptr IOStream -> Ptr () -> IO () Source
NewConnection
type SocketNewConnectionCallback = Socket -> IO () Source
afterSocketNewConnection :: (GObject a, MonadIO m) => a -> SocketNewConnectionCallback -> m SignalHandlerId Source
mkSocketNewConnectionCallback :: SocketNewConnectionCallbackC -> IO (FunPtr SocketNewConnectionCallbackC) Source
onSocketNewConnection :: (GObject a, MonadIO m) => a -> SocketNewConnectionCallback -> m SignalHandlerId Source
socketNewConnectionCallbackWrapper :: SocketNewConnectionCallback -> Ptr () -> Ptr Socket -> Ptr () -> IO () Source
Readable
type SocketReadableCallback = IO () Source
type SocketReadableCallbackC = Ptr () -> Ptr () -> IO () Source
afterSocketReadable :: (GObject a, MonadIO m) => a -> SocketReadableCallback -> m SignalHandlerId Source
onSocketReadable :: (GObject a, MonadIO m) => a -> SocketReadableCallback -> m SignalHandlerId Source
socketReadableCallbackWrapper :: SocketReadableCallback -> Ptr () -> Ptr () -> IO () Source
Writable
type SocketWritableCallback = IO () Source
type SocketWritableCallbackC = Ptr () -> Ptr () -> IO () Source
afterSocketWritable :: (GObject a, MonadIO m) => a -> SocketWritableCallback -> m SignalHandlerId Source
onSocketWritable :: (GObject a, MonadIO m) => a -> SocketWritableCallback -> m SignalHandlerId Source
socketWritableCallbackWrapper :: SocketWritableCallback -> Ptr () -> Ptr () -> IO () Source