| 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 |
GI.Soup.Objects.WebsocketExtension
Description
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.
Constructors
| WebsocketExtension (ManagedPtr WebsocketExtension) |
Instances
| Eq WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension Methods (==) :: WebsocketExtension -> WebsocketExtension -> Bool (/=) :: WebsocketExtension -> WebsocketExtension -> Bool | |
| GObject WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension | |
| ManagedPtrNewtype WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension Methods toManagedPtr :: WebsocketExtension -> ManagedPtr WebsocketExtension | |
| TypedObject WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension Methods glibType :: IO GType | |
| IsGValue WebsocketExtension Source # | Convert |
Defined in GI.Soup.Objects.WebsocketExtension | |
| HasParentTypes WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension | |
| type ParentTypes WebsocketExtension Source # | |
Defined in GI.Soup.Objects.WebsocketExtension type ParentTypes WebsocketExtension = '[Object] | |
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 #
Arguments
| :: (HasCallStack, MonadIO m, IsWebsocketExtension a) | |
| => a |
|
| -> WebsocketConnectionType |
|
| -> Maybe (Map (Ptr ()) (Ptr ())) |
|
| -> m () | (Can throw |
Configures extension with the given params
getRequestParams
websocketExtensionGetRequestParams Source #
Arguments
| :: (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 #
Arguments
| :: (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 #
Arguments
| :: (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 #
Arguments
| :: (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