Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype WebsocketExtension = WebsocketExtension (ManagedPtr WebsocketExtension)
- class (GObject o, IsDescendantOf WebsocketExtension o) => IsWebsocketExtension o
- toWebsocketExtension :: (MonadIO m, IsWebsocketExtension o) => o -> m WebsocketExtension
- websocketExtensionConfigure :: (HasCallStack, MonadIO m, IsWebsocketExtension a) => a -> WebsocketConnectionType -> Maybe (Map (Ptr ()) (Ptr ())) -> m ()
- websocketExtensionGetRequestParams :: (HasCallStack, MonadIO m, IsWebsocketExtension a) => a -> m (Maybe Text)
- websocketExtensionGetResponseParams :: (HasCallStack, MonadIO m, IsWebsocketExtension a) => a -> m (Maybe Text)
- websocketExtensionProcessIncomingMessage :: (HasCallStack, MonadIO m, IsWebsocketExtension a) => a -> Word8 -> Bytes -> m (Bytes, Word8)
- websocketExtensionProcessOutgoingMessage :: (HasCallStack, MonadIO m, IsWebsocketExtension a) => a -> Word8 -> Bytes -> m (Bytes, Word8)
Exported types
newtype WebsocketExtension Source #
Memory-managed wrapper type.
WebsocketExtension (ManagedPtr WebsocketExtension) |
Instances
class (GObject o, IsDescendantOf WebsocketExtension o) => IsWebsocketExtension o Source #
Type class for types which can be safely cast to WebsocketExtension
, for instance with toWebsocketExtension
.
Instances
(GObject o, IsDescendantOf WebsocketExtension o) => IsWebsocketExtension o Source # | |
Defined in GI.Soup.Objects.WebsocketExtension |
toWebsocketExtension :: (MonadIO m, IsWebsocketExtension o) => o -> m WebsocketExtension Source #
Cast to WebsocketExtension
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
configure
websocketExtensionConfigure Source #
:: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
=> a |
|
-> WebsocketConnectionType |
|
-> Maybe (Map (Ptr ()) (Ptr ())) |
|
-> m () | (Can throw |
Configures extension
with the given params
getRequestParams
websocketExtensionGetRequestParams Source #
:: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
=> a |
|
-> m (Maybe Text) | Returns: a new allocated string with the parameters |
Get the parameters strings to be included in the request header. If the extension
doesn't include any parameter in the request, this function returns Nothing
.
Since: 2.68
getResponseParams
websocketExtensionGetResponseParams Source #
:: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
=> a |
|
-> m (Maybe Text) | Returns: a new allocated string with the parameters |
Get the parameters strings to be included in the response header. If the extension
doesn't include any parameter in the response, this function returns Nothing
.
Since: 2.68
processIncomingMessage
websocketExtensionProcessIncomingMessage Source #
:: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
=> a |
|
-> Word8 |
|
-> Bytes |
|
-> m (Bytes, Word8) | Returns: the message payload data, or |
Process a message after it's received. If the payload isn't changed the given
payload
is just returned, otherwise bytesUnref
is called on the given
payload
and a new Bytes
is returned with the new data.
Extensions using reserved bits of the header will reset them in header
.
Since: 2.68
processOutgoingMessage
websocketExtensionProcessOutgoingMessage Source #
:: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
=> a |
|
-> Word8 |
|
-> Bytes |
|
-> m (Bytes, Word8) | Returns: the message payload data, or |
Process a message before it's sent. If the payload isn't changed the given
payload
is just returned, otherwise bytesUnref
is called on the given
payload
and a new Bytes
is returned with the new data.
Extensions using reserved bits of the header will change them in header
.
Since: 2.68