gi-gio-2.0.35: Gio bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | Safe-Inferred
Language | Haskell2010

GI.Gio.Objects.TcpWrapperConnection

Contents

- Exported types
- Methods
  - getBaseIoStream
  - new
- Properties
  - baseIoStream

Description

A `GTcpWrapperConnection` can be used to wrap a `IOStream` that is based on a `Socket`, but which is not actually a `SocketConnection`. This is used by `SocketClient` so that it can always return a `SocketConnection`, even when the connection it has actually created is not directly a `SocketConnection`.

Since: 2.28

Synopsis

- newtype TcpWrapperConnection = TcpWrapperConnection (ManagedPtr TcpWrapperConnection)
- class (GObject o, IsDescendantOf TcpWrapperConnection o) => IsTcpWrapperConnection o
- toTcpWrapperConnection :: (MonadIO m, IsTcpWrapperConnection o) => o -> m TcpWrapperConnection
- tcpWrapperConnectionGetBaseIoStream :: (HasCallStack, MonadIO m, IsTcpWrapperConnection a) => a -> m IOStream
- tcpWrapperConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsSocket b) => a -> b -> m TcpWrapperConnection
- constructTcpWrapperConnectionBaseIoStream :: (IsTcpWrapperConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o)
- getTcpWrapperConnectionBaseIoStream :: (MonadIO m, IsTcpWrapperConnection o) => o -> m IOStream

# Exported types

newtype TcpWrapperConnection Source #

Memory-managed wrapper type.

Constructors

TcpWrapperConnection (ManagedPtr TcpWrapperConnection) |

#### Instances

Instances details

Eq TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection Methods (==) :: TcpWrapperConnection -> TcpWrapperConnection -> Bool Source # (/=) :: TcpWrapperConnection -> TcpWrapperConnection -> Bool Source #
GObject TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection
ManagedPtrNewtype TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection Methods toManagedPtr :: TcpWrapperConnection -> ManagedPtr TcpWrapperConnection Source #
TypedObject TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection Methods glibType :: IO GType Source #
HasParentTypes TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection
IsGValue (Maybe TcpWrapperConnection) Source # | Convert `TcpWrapperConnection` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TcpWrapperConnection -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TcpWrapperConnection) Source #
type ParentTypes TcpWrapperConnection Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection type ParentTypes TcpWrapperConnection = '[TcpConnection, SocketConnection, IOStream, Object]

class (GObject o, IsDescendantOf TcpWrapperConnection o) => IsTcpWrapperConnection o Source #

Type class for types which can be safely cast to `TcpWrapperConnection`, for instance with `toTcpWrapperConnection`.

#### Instances

Instances details

(GObject o, IsDescendantOf TcpWrapperConnection o) => IsTcpWrapperConnection o Source # |
Instance details Defined in GI.Gio.Objects.TcpWrapperConnection

toTcpWrapperConnection :: (MonadIO m, IsTcpWrapperConnection o) => o -> m TcpWrapperConnection Source #

Cast to `TcpWrapperConnection`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, clearPending, close, closeAsync, closeFinish, connect, connectAsync, connectFinish, forceFloating, freezeNotify, getv, hasPending, isClosed, isConnected, isFloating, notify, notifyByPspec, ref, refSink, runDispose, spliceAsync, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getBaseIoStream, getData, getGracefulDisconnect, getInputStream, getLocalAddress, getOutputStream, getProperty, getQdata, getRemoteAddress, getSocket.

#### Setters

setData, setDataFull, setGracefulDisconnect, setPending, setProperty.

## getBaseIoStream

tcpWrapperConnectionGetBaseIoStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsTcpWrapperConnection a) |
=> a | `conn`: a `TcpWrapperConnection`
-> m IOStream | Returns: `conn`'s base `IOStream`

Gets `conn`'s base `IOStream`

## new

tcpWrapperConnectionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsIOStream a, IsSocket b) |
=> a | `baseIoStream`: the `IOStream` to wrap
-> b | `socket`: the `Socket` associated with `baseIoStream`
-> m TcpWrapperConnection | Returns: the new `SocketConnection`.

Wraps `baseIoStream` and `socket` together as a `SocketConnection`.

Since: 2.28

# Properties

## baseIoStream

The wrapped `IOStream`.

Since: 2.28

constructTcpWrapperConnectionBaseIoStream :: (IsTcpWrapperConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o) Source #

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

getTcpWrapperConnectionBaseIoStream :: (MonadIO m, IsTcpWrapperConnection o) => o -> m IOStream Source #

Get the value of the “`base-io-stream`” property. When overloading is enabled, this is equivalent to

    get tcpWrapperConnection #baseIoStream