gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.TcpConnection

Description

This is the subclass of SocketConnection that is created for TCP/IP sockets.

Since: 2.22

Synopsis

Exported types

newtype TcpConnection Source #

Memory-managed wrapper type.

Instances

Instances details
Eq TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

GObject TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

ManagedPtrNewtype TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

TypedObject TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

Methods

glibType :: IO GType #

HasParentTypes TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

HasAttributeList TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

(info ~ ResolveTcpConnectionMethod t TcpConnection, OverloadedMethod info TcpConnection p, HasField t TcpConnection p) => HasField (t :: Symbol) TcpConnection (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

Methods

getField :: TcpConnection -> p #

(info ~ ResolveTcpConnectionMethod t TcpConnection, OverloadedMethodInfo info TcpConnection) => IsLabel t (MethodProxy info TcpConnection) Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

(info ~ ResolveTcpConnectionMethod t TcpConnection, OverloadedMethod info TcpConnection p) => IsLabel t (TcpConnection -> p) Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

Methods

fromLabel :: TcpConnection -> p #

IsGValue (Maybe TcpConnection) Source #

Convert TcpConnection to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttributeList TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type ParentTypes TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type SignalList TcpConnection Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

class (GObject o, IsDescendantOf TcpConnection o) => IsTcpConnection o Source #

Type class for types which can be safely cast to TcpConnection, for instance with toTcpConnection.

Instances

Instances details
(GObject o, IsDescendantOf TcpConnection o) => IsTcpConnection o Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

toTcpConnection :: (MonadIO m, IsTcpConnection o) => o -> m TcpConnection Source #

Cast to TcpConnection, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveTcpConnectionMethod (t :: Symbol) o where ... Source #

Equations

ResolveTcpConnectionMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveTcpConnectionMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveTcpConnectionMethod "clearPending" o = IOStreamClearPendingMethodInfo 
ResolveTcpConnectionMethod "close" o = IOStreamCloseMethodInfo 
ResolveTcpConnectionMethod "closeAsync" o = IOStreamCloseAsyncMethodInfo 
ResolveTcpConnectionMethod "closeFinish" o = IOStreamCloseFinishMethodInfo 
ResolveTcpConnectionMethod "connect" o = SocketConnectionConnectMethodInfo 
ResolveTcpConnectionMethod "connectAsync" o = SocketConnectionConnectAsyncMethodInfo 
ResolveTcpConnectionMethod "connectFinish" o = SocketConnectionConnectFinishMethodInfo 
ResolveTcpConnectionMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveTcpConnectionMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveTcpConnectionMethod "getv" o = ObjectGetvMethodInfo 
ResolveTcpConnectionMethod "hasPending" o = IOStreamHasPendingMethodInfo 
ResolveTcpConnectionMethod "isClosed" o = IOStreamIsClosedMethodInfo 
ResolveTcpConnectionMethod "isConnected" o = SocketConnectionIsConnectedMethodInfo 
ResolveTcpConnectionMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveTcpConnectionMethod "notify" o = ObjectNotifyMethodInfo 
ResolveTcpConnectionMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveTcpConnectionMethod "ref" o = ObjectRefMethodInfo 
ResolveTcpConnectionMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveTcpConnectionMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveTcpConnectionMethod "spliceAsync" o = IOStreamSpliceAsyncMethodInfo 
ResolveTcpConnectionMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveTcpConnectionMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveTcpConnectionMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveTcpConnectionMethod "unref" o = ObjectUnrefMethodInfo 
ResolveTcpConnectionMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveTcpConnectionMethod "getData" o = ObjectGetDataMethodInfo 
ResolveTcpConnectionMethod "getGracefulDisconnect" o = TcpConnectionGetGracefulDisconnectMethodInfo 
ResolveTcpConnectionMethod "getInputStream" o = IOStreamGetInputStreamMethodInfo 
ResolveTcpConnectionMethod "getLocalAddress" o = SocketConnectionGetLocalAddressMethodInfo 
ResolveTcpConnectionMethod "getOutputStream" o = IOStreamGetOutputStreamMethodInfo 
ResolveTcpConnectionMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveTcpConnectionMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveTcpConnectionMethod "getRemoteAddress" o = SocketConnectionGetRemoteAddressMethodInfo 
ResolveTcpConnectionMethod "getSocket" o = SocketConnectionGetSocketMethodInfo 
ResolveTcpConnectionMethod "setData" o = ObjectSetDataMethodInfo 
ResolveTcpConnectionMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveTcpConnectionMethod "setGracefulDisconnect" o = TcpConnectionSetGracefulDisconnectMethodInfo 
ResolveTcpConnectionMethod "setPending" o = IOStreamSetPendingMethodInfo 
ResolveTcpConnectionMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveTcpConnectionMethod l o = MethodResolutionFailed l o :: Type 

getGracefulDisconnect

tcpConnectionGetGracefulDisconnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsTcpConnection a) 
=> a

connection: a TcpConnection

-> m Bool

Returns: True if graceful disconnect is used on close, False otherwise

Checks if graceful disconnects are used. See tcpConnectionSetGracefulDisconnect.

Since: 2.22

setGracefulDisconnect

tcpConnectionSetGracefulDisconnect Source #

Arguments

:: (HasCallStack, MonadIO m, IsTcpConnection a) 
=> a

connection: a TcpConnection

-> Bool

gracefulDisconnect: Whether to do graceful disconnects or not

-> 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

Whether iOStreamClose does a graceful disconnect.

Since: 2.22

data TcpConnectionGracefulDisconnectPropertyInfo Source #

Instances

Instances details
AttrInfo TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

Associated Types

type AttrAllowedOps TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrBaseTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrGetType TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrSetTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrTransferTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrTransferType TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrLabel TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrOrigin TcpConnectionGracefulDisconnectPropertyInfo 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrAllowedOps TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrBaseTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrGetType TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrLabel TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrOrigin TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrSetTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrTransferType TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

type AttrTransferTypeConstraint TcpConnectionGracefulDisconnectPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.TcpConnection

constructTcpConnectionGracefulDisconnect :: (IsTcpConnection o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “graceful-disconnect” property. This is rarely needed directly, but it is used by new.

getTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> m Bool Source #

Get the value of the “graceful-disconnect” property. When overloading is enabled, this is equivalent to

get tcpConnection #gracefulDisconnect

setTcpConnectionGracefulDisconnect :: (MonadIO m, IsTcpConnection o) => o -> Bool -> m () Source #

Set the value of the “graceful-disconnect” property. When overloading is enabled, this is equivalent to

set tcpConnection [ #gracefulDisconnect := value ]