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.Structs.OutputMessage

Contents

- Exported types
- Methods
- Properties
  - address
  - bytesSent
  - numControlMessages
  - numVectors
  - vectors

Description

Structure used for scatter/gather data output when sending multiple messages or packets in one go. You generally pass in an array of `GOutputVectors` and the operation will use all the buffers as if they were one buffer.

If `address` is `Nothing` then the message is sent to the default receiver (as previously set by `socketConnect`).

Since: 2.44

Synopsis

- newtype OutputMessage = OutputMessage (ManagedPtr OutputMessage)
- newZeroOutputMessage :: MonadIO m => m OutputMessage
- clearOutputMessageAddress :: MonadIO m => OutputMessage -> m ()
- getOutputMessageAddress :: MonadIO m => OutputMessage -> m (Maybe SocketAddress)
- setOutputMessageAddress :: MonadIO m => OutputMessage -> Ptr SocketAddress -> m ()
- getOutputMessageBytesSent :: MonadIO m => OutputMessage -> m Word32
- setOutputMessageBytesSent :: MonadIO m => OutputMessage -> Word32 -> m ()
- getOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> m Word32
- setOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> Word32 -> m ()
- getOutputMessageNumVectors :: MonadIO m => OutputMessage -> m Word32
- setOutputMessageNumVectors :: MonadIO m => OutputMessage -> Word32 -> m ()
- clearOutputMessageVectors :: MonadIO m => OutputMessage -> m ()
- getOutputMessageVectors :: MonadIO m => OutputMessage -> m (Maybe OutputVector)
- setOutputMessageVectors :: MonadIO m => OutputMessage -> Ptr OutputVector -> m ()

# Exported types

newtype OutputMessage Source #

Memory-managed wrapper type.

Constructors

OutputMessage (ManagedPtr OutputMessage) |

#### Instances

Instances details

Eq OutputMessage Source # |
Instance details Defined in GI.Gio.Structs.OutputMessage Methods (==) :: OutputMessage -> OutputMessage -> Bool Source # (/=) :: OutputMessage -> OutputMessage -> Bool Source #
BoxedPtr OutputMessage Source # |
Instance details Defined in GI.Gio.Structs.OutputMessage Methods boxedPtrCopy :: OutputMessage -> IO OutputMessage Source # boxedPtrFree :: OutputMessage -> IO () Source #
CallocPtr OutputMessage Source # |
Instance details Defined in GI.Gio.Structs.OutputMessage Methods boxedPtrCalloc :: IO (Ptr OutputMessage) Source #
ManagedPtrNewtype OutputMessage Source # |
Instance details Defined in GI.Gio.Structs.OutputMessage Methods toManagedPtr :: OutputMessage -> ManagedPtr OutputMessage Source #
tag ~ 'AttrSet => Constructible OutputMessage tag Source # |
Instance details Defined in GI.Gio.Structs.OutputMessage Methods new :: MonadIO m => (ManagedPtr OutputMessage -> OutputMessage) -> [AttrOp OutputMessage tag] -> m OutputMessage Source #

newZeroOutputMessage :: MonadIO m => m OutputMessage Source #

Construct a `OutputMessage` struct initialized to zero.

# Methods

# Properties

## address

a `SocketAddress`, or `Nothing`

clearOutputMessageAddress :: MonadIO m => OutputMessage -> m () Source #

Set the value of the “`address`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #address

getOutputMessageAddress :: MonadIO m => OutputMessage -> m (Maybe SocketAddress) Source #

Get the value of the “`address`” field. When overloading is enabled, this is equivalent to

    get outputMessage #address

setOutputMessageAddress :: MonadIO m => OutputMessage -> Ptr SocketAddress -> m () Source #

Set the value of the “`address`” field. When overloading is enabled, this is equivalent to

    set outputMessage [ #address := value ]

## bytesSent

initialize to 0. Will be set to the number of bytes that have been sent

getOutputMessageBytesSent :: MonadIO m => OutputMessage -> m Word32 Source #

Get the value of the “`bytes_sent`” field. When overloading is enabled, this is equivalent to

    get outputMessage #bytesSent

setOutputMessageBytesSent :: MonadIO m => OutputMessage -> Word32 -> m () Source #

Set the value of the “`bytes_sent`” field. When overloading is enabled, this is equivalent to

    set outputMessage [ #bytesSent := value ]

## numControlMessages

number of elements in `controlMessages`.

getOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> m Word32 Source #

Get the value of the “`num_control_messages`” field. When overloading is enabled, this is equivalent to

    get outputMessage #numControlMessages

setOutputMessageNumControlMessages :: MonadIO m => OutputMessage -> Word32 -> m () Source #

Set the value of the “`num_control_messages`” field. When overloading is enabled, this is equivalent to

    set outputMessage [ #numControlMessages := value ]

## numVectors

the number of output vectors pointed to by `vectors`.

getOutputMessageNumVectors :: MonadIO m => OutputMessage -> m Word32 Source #

Get the value of the “`num_vectors`” field. When overloading is enabled, this is equivalent to

    get outputMessage #numVectors

setOutputMessageNumVectors :: MonadIO m => OutputMessage -> Word32 -> m () Source #

Set the value of the “`num_vectors`” field. When overloading is enabled, this is equivalent to

    set outputMessage [ #numVectors := value ]

## vectors

pointer to an array of output vectors

clearOutputMessageVectors :: MonadIO m => OutputMessage -> m () Source #

Set the value of the “`vectors`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #vectors

getOutputMessageVectors :: MonadIO m => OutputMessage -> m (Maybe OutputVector) Source #

Get the value of the “`vectors`” field. When overloading is enabled, this is equivalent to

    get outputMessage #vectors

setOutputMessageVectors :: MonadIO m => OutputMessage -> Ptr OutputVector -> m () Source #

Set the value of the “`vectors`” field. When overloading is enabled, this is equivalent to

    set outputMessage [ #vectors := value ]