Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
An IPv4 or IPv6 socket address; that is, the combination of a
InetAddress
and a port number.
Synopsis
- newtype InetSocketAddress = InetSocketAddress (ManagedPtr InetSocketAddress)
- class (GObject o, IsDescendantOf InetSocketAddress o) => IsInetSocketAddress o
- toInetSocketAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetSocketAddress
- noInetSocketAddress :: Maybe InetSocketAddress
- inetSocketAddressGetAddress :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m InetAddress
- inetSocketAddressGetFlowinfo :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32
- inetSocketAddressGetPort :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word16
- inetSocketAddressGetScopeId :: (HasCallStack, MonadIO m, IsInetSocketAddress a) => a -> m Word32
- inetSocketAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> m InetSocketAddress
- inetSocketAddressNewFromString :: (HasCallStack, MonadIO m) => Text -> Word32 -> m InetSocketAddress
- constructInetSocketAddressAddress :: (IsInetSocketAddress o, IsInetAddress a) => a -> IO (GValueConstruct o)
- getInetSocketAddressAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetAddress
- constructInetSocketAddressFlowinfo :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o)
- getInetSocketAddressFlowinfo :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
- constructInetSocketAddressPort :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o)
- getInetSocketAddressPort :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
- constructInetSocketAddressScopeId :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o)
- getInetSocketAddressScopeId :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32
Exported types
newtype InetSocketAddress Source #
Memory-managed wrapper type.
Instances
GObject InetSocketAddress Source # | |
Defined in GI.Gio.Objects.InetSocketAddress gobjectType :: IO GType # | |
HasParentTypes InetSocketAddress Source # | |
Defined in GI.Gio.Objects.InetSocketAddress | |
type ParentTypes InetSocketAddress Source # | |
Defined in GI.Gio.Objects.InetSocketAddress type ParentTypes InetSocketAddress = SocketAddress ': (Object ': (SocketConnectable ': ([] :: [Type]))) |
class (GObject o, IsDescendantOf InetSocketAddress o) => IsInetSocketAddress o Source #
Type class for types which can be safely cast to InetSocketAddress
, for instance with toInetSocketAddress
.
Instances
(GObject o, IsDescendantOf InetSocketAddress o) => IsInetSocketAddress o Source # | |
Defined in GI.Gio.Objects.InetSocketAddress |
toInetSocketAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetSocketAddress Source #
Cast to InetSocketAddress
, for types for which this is known to be safe. For general casts, use castTo
.
noInetSocketAddress :: Maybe InetSocketAddress Source #
A convenience alias for Nothing
:: Maybe
InetSocketAddress
.
Methods
getAddress
inetSocketAddressGetAddress Source #
:: (HasCallStack, MonadIO m, IsInetSocketAddress a) | |
=> a |
|
-> m InetAddress | Returns: the |
Gets address
's InetAddress
.
Since: 2.22
getFlowinfo
inetSocketAddressGetFlowinfo Source #
:: (HasCallStack, MonadIO m, IsInetSocketAddress a) | |
=> a |
|
-> m Word32 | Returns: the flowinfo field |
Gets the sin6_flowinfo
field from address
,
which must be an IPv6 address.
Since: 2.32
getPort
inetSocketAddressGetPort Source #
:: (HasCallStack, MonadIO m, IsInetSocketAddress a) | |
=> a |
|
-> m Word16 | Returns: the port for |
Gets address
's port.
Since: 2.22
getScopeId
inetSocketAddressGetScopeId Source #
:: (HasCallStack, MonadIO m, IsInetSocketAddress a) | |
=> a |
|
-> m Word32 | Returns: the scope id field |
Gets the sin6_scope_id
field from address
,
which must be an IPv6 address.
Since: 2.32
new
:: (HasCallStack, MonadIO m, IsInetAddress a) | |
=> a |
|
-> Word16 |
|
-> m InetSocketAddress | Returns: a new |
Creates a new InetSocketAddress
for address
and port
.
Since: 2.22
newFromString
inetSocketAddressNewFromString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Word32 |
|
-> m InetSocketAddress | Returns: a new |
Creates a new InetSocketAddress
for address
and port
.
If address
is an IPv6 address, it can also contain a scope ID
(separated from the address by a %
).
Since: 2.40
Properties
address
No description available in the introspection data.
constructInetSocketAddressAddress :: (IsInetSocketAddress o, IsInetAddress a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “address
” property. This is rarely needed directly, but it is used by new
.
getInetSocketAddressAddress :: (MonadIO m, IsInetSocketAddress o) => o -> m InetAddress Source #
Get the value of the “address
” property.
When overloading is enabled, this is equivalent to
get
inetSocketAddress #address
flowinfo
The sin6_flowinfo
field, for IPv6 addresses.
Since: 2.32
constructInetSocketAddressFlowinfo :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “flowinfo
” property. This is rarely needed directly, but it is used by new
.
getInetSocketAddressFlowinfo :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32 Source #
Get the value of the “flowinfo
” property.
When overloading is enabled, this is equivalent to
get
inetSocketAddress #flowinfo
port
No description available in the introspection data.
constructInetSocketAddressPort :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “port
” property. This is rarely needed directly, but it is used by new
.
getInetSocketAddressPort :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32 Source #
Get the value of the “port
” property.
When overloading is enabled, this is equivalent to
get
inetSocketAddress #port
scopeId
No description available in the introspection data.
constructInetSocketAddressScopeId :: IsInetSocketAddress o => Word32 -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “scope-id
” property. This is rarely needed directly, but it is used by new
.
getInetSocketAddressScopeId :: (MonadIO m, IsInetSocketAddress o) => o -> m Word32 Source #
Get the value of the “scope-id
” property.
When overloading is enabled, this is equivalent to
get
inetSocketAddress #scopeId