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 |
This is the subclass of SocketConnection
that is created
for TCP/IP sockets.
- newtype TcpConnection = TcpConnection (ManagedPtr TcpConnection)
- class GObject o => IsTcpConnection o
- toTcpConnection :: IsTcpConnection o => o -> IO TcpConnection
- noTcpConnection :: Maybe TcpConnection
- data TcpConnectionGetGracefulDisconnectMethodInfo
- tcpConnectionGetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> m Bool
- data TcpConnectionSetGracefulDisconnectMethodInfo
- tcpConnectionSetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> Bool -> m ()
- data TcpConnectionGracefulDisconnectPropertyInfo
- constructTcpConnectionGracefulDisconnect :: IsTcpConnection o => Bool -> IO (GValueConstruct o)
- getTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> m Bool
- setTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> Bool -> m ()
- tcpConnectionGracefulDisconnect :: AttrLabelProxy "gracefulDisconnect"
Exported types
newtype TcpConnection Source #
GObject TcpConnection Source # | |
IsObject TcpConnection Source # | |
IsTcpConnection TcpConnection Source # | |
IsSocketConnection TcpConnection Source # | |
IsIOStream TcpConnection Source # | |
((~) * info (ResolveTcpConnectionMethod t TcpConnection), MethodInfo * info TcpConnection p) => IsLabel t (TcpConnection -> p) Source # | |
((~) * info (ResolveTcpConnectionMethod t TcpConnection), MethodInfo * info TcpConnection p) => IsLabelProxy t (TcpConnection -> p) Source # | |
HasAttributeList * TcpConnection Source # | |
type AttributeList TcpConnection Source # | |
type SignalList TcpConnection Source # | |
class GObject o => IsTcpConnection o Source #
toTcpConnection :: IsTcpConnection o => o -> IO TcpConnection Source #
Methods
getGracefulDisconnect
data TcpConnectionGetGracefulDisconnectMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsTcpConnection a) => MethodInfo * TcpConnectionGetGracefulDisconnectMethodInfo a signature Source # | |
tcpConnectionGetGracefulDisconnect Source #
:: (HasCallStack, MonadIO m, IsTcpConnection a) | |
=> a |
|
-> m Bool | Returns: |
Checks if graceful disconnects are used. See
tcpConnectionSetGracefulDisconnect
.
Since: 2.22
setGracefulDisconnect
data TcpConnectionSetGracefulDisconnectMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsTcpConnection a) => MethodInfo * TcpConnectionSetGracefulDisconnectMethodInfo a signature Source # | |
tcpConnectionSetGracefulDisconnect Source #
:: (HasCallStack, MonadIO m, IsTcpConnection a) | |
=> a |
|
-> Bool |
|
-> m () |
This enables graceful disconnects on close. A graceful disconnect means that we signal the receiving end that the connection is terminated and wait for it to close the connection before closing the connection.
A graceful disconnect means that we can be sure that we successfully sent all the outstanding data to the other end, or get an error reported. However, it also means we have to wait for all the data to reach the other side and for it to acknowledge this by closing the socket, which may take a while. For this reason it is disabled by default.
Since: 2.22
Properties
gracefulDisconnect
data TcpConnectionGracefulDisconnectPropertyInfo Source #
constructTcpConnectionGracefulDisconnect :: IsTcpConnection o => Bool -> IO (GValueConstruct o) Source #
getTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> m Bool Source #
setTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> Bool -> m () Source #
tcpConnectionGracefulDisconnect :: AttrLabelProxy "gracefulDisconnect" Source #