gi-gio-2.0.12: Gio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.UnixOutputStream

Contents

Description

UnixOutputStream implements OutputStream for writing to a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use poll() to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.)

Note that <gio/gunixoutputstream.h> belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file when using it.

Synopsis

Exported types

Methods

getCloseFd

unixOutputStreamGetCloseFd Source #

Arguments

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

stream: a UnixOutputStream

-> m Bool

Returns: True if the file descriptor is closed when done

Returns whether the file descriptor of stream will be closed when the stream is closed.

Since: 2.20

getFd

unixOutputStreamGetFd Source #

Arguments

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

stream: a UnixOutputStream

-> m Int32

Returns: The file descriptor of stream

Return the UNIX file descriptor that the stream writes to.

Since: 2.20

new

unixOutputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Int32

fd: a UNIX file descriptor

-> Bool

closeFd: True to close the file descriptor when done

-> m UnixOutputStream

Returns: a new OutputStream

Creates a new UnixOutputStream for the given fd.

If closeFd, is True, the file descriptor will be closed when the output stream is destroyed.

setCloseFd

unixOutputStreamSetCloseFd Source #

Arguments

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

stream: a UnixOutputStream

-> Bool

closeFd: True to close the file descriptor when done

-> m () 

Sets whether the file descriptor of stream shall be closed when the stream is closed.

Since: 2.20

Properties

closeFd

data UnixOutputStreamCloseFdPropertyInfo Source #

Instances

AttrInfo UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrOrigin UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrLabel UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrGetType UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrBaseTypeConstraint UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrSetTypeConstraint UnixOutputStreamCloseFdPropertyInfo Source # 
type AttrAllowedOps UnixOutputStreamCloseFdPropertyInfo Source # 

fd

data UnixOutputStreamFdPropertyInfo Source #

Instances

AttrInfo UnixOutputStreamFdPropertyInfo Source # 
type AttrOrigin UnixOutputStreamFdPropertyInfo Source # 
type AttrLabel UnixOutputStreamFdPropertyInfo Source # 
type AttrGetType UnixOutputStreamFdPropertyInfo Source # 
type AttrBaseTypeConstraint UnixOutputStreamFdPropertyInfo Source # 
type AttrSetTypeConstraint UnixOutputStreamFdPropertyInfo Source # 
type AttrAllowedOps UnixOutputStreamFdPropertyInfo Source #