Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Soup.Objects.WebsocketConnection
Description
The WebSocket Protocol
Provides support for the WebSocket protocol.
To connect to a WebSocket server, create a [classsession
] and call
[methodsession
.websocket_connect_async]. To accept WebSocket
connections, create a [classserver
] and add a handler to it with
[methodserver
.add_websocket_handler].
(Lower-level support is available via
[funcwebsocketClientPrepareHandshake
] and
[funcwebsocketClientVerifyHandshake
], for handling the client side of the
WebSocket handshake, and [funcwebsocketServerProcessHandshake
] for
handling the server side.)
WebsocketConnection
handles the details of WebSocket communication. You
can use [methodwebsocketConnection
.send_text] and
[methodwebsocketConnection
.send_binary] to send data, and the
signalwebsocketConnection
[message] signal to receive data.
(tWebsocketConnection
currently only supports asynchronous I/O.)
Synopsis
- newtype WebsocketConnection = WebsocketConnection (ManagedPtr WebsocketConnection)
- class (GObject o, IsDescendantOf WebsocketConnection o) => IsWebsocketConnection o
- toWebsocketConnection :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketConnection
- type family ResolveWebsocketConnectionMethod (t :: Symbol) o where ...
- data WebsocketConnectionCloseMethodInfo
- websocketConnectionClose :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> CUShort -> Maybe Text -> m ()
- data WebsocketConnectionGetCloseCodeMethodInfo
- websocketConnectionGetCloseCode :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m CUShort
- data WebsocketConnectionGetCloseDataMethodInfo
- websocketConnectionGetCloseData :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m Text
- data WebsocketConnectionGetConnectionTypeMethodInfo
- websocketConnectionGetConnectionType :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m WebsocketConnectionType
- data WebsocketConnectionGetExtensionsMethodInfo
- websocketConnectionGetExtensions :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m [WebsocketExtension]
- data WebsocketConnectionGetIoStreamMethodInfo
- websocketConnectionGetIoStream :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m IOStream
- data WebsocketConnectionGetKeepaliveIntervalMethodInfo
- websocketConnectionGetKeepaliveInterval :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m Word32
- data WebsocketConnectionGetMaxIncomingPayloadSizeMethodInfo
- websocketConnectionGetMaxIncomingPayloadSize :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m Word64
- data WebsocketConnectionGetOriginMethodInfo
- websocketConnectionGetOrigin :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m (Maybe Text)
- data WebsocketConnectionGetProtocolMethodInfo
- websocketConnectionGetProtocol :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m (Maybe Text)
- data WebsocketConnectionGetStateMethodInfo
- websocketConnectionGetState :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m WebsocketState
- data WebsocketConnectionGetUriMethodInfo
- websocketConnectionGetUri :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> m Uri
- websocketConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsWebsocketExtension b) => a -> Uri -> WebsocketConnectionType -> Maybe Text -> Maybe Text -> [b] -> m WebsocketConnection
- data WebsocketConnectionSendBinaryMethodInfo
- websocketConnectionSendBinary :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> Maybe ByteString -> m ()
- data WebsocketConnectionSendMessageMethodInfo
- websocketConnectionSendMessage :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> WebsocketDataType -> Bytes -> m ()
- data WebsocketConnectionSendTextMethodInfo
- websocketConnectionSendText :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> Text -> m ()
- data WebsocketConnectionSetKeepaliveIntervalMethodInfo
- websocketConnectionSetKeepaliveInterval :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> Word32 -> m ()
- data WebsocketConnectionSetMaxIncomingPayloadSizeMethodInfo
- websocketConnectionSetMaxIncomingPayloadSize :: (HasCallStack, MonadIO m, IsWebsocketConnection a) => a -> Word64 -> m ()
- data WebsocketConnectionConnectionTypePropertyInfo
- constructWebsocketConnectionConnectionType :: (IsWebsocketConnection o, MonadIO m) => WebsocketConnectionType -> m (GValueConstruct o)
- getWebsocketConnectionConnectionType :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketConnectionType
- websocketConnectionConnectionType :: AttrLabelProxy "connectionType"
- data WebsocketConnectionExtensionsPropertyInfo
- constructWebsocketConnectionExtensions :: (IsWebsocketConnection o, MonadIO m) => Ptr () -> m (GValueConstruct o)
- getWebsocketConnectionExtensions :: (MonadIO m, IsWebsocketConnection o) => o -> m (Ptr ())
- websocketConnectionExtensions :: AttrLabelProxy "extensions"
- data WebsocketConnectionIoStreamPropertyInfo
- constructWebsocketConnectionIoStream :: (IsWebsocketConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o)
- getWebsocketConnectionIoStream :: (MonadIO m, IsWebsocketConnection o) => o -> m IOStream
- websocketConnectionIoStream :: AttrLabelProxy "ioStream"
- data WebsocketConnectionKeepaliveIntervalPropertyInfo
- constructWebsocketConnectionKeepaliveInterval :: (IsWebsocketConnection o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getWebsocketConnectionKeepaliveInterval :: (MonadIO m, IsWebsocketConnection o) => o -> m Word32
- setWebsocketConnectionKeepaliveInterval :: (MonadIO m, IsWebsocketConnection o) => o -> Word32 -> m ()
- websocketConnectionKeepaliveInterval :: AttrLabelProxy "keepaliveInterval"
- data WebsocketConnectionMaxIncomingPayloadSizePropertyInfo
- constructWebsocketConnectionMaxIncomingPayloadSize :: (IsWebsocketConnection o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getWebsocketConnectionMaxIncomingPayloadSize :: (MonadIO m, IsWebsocketConnection o) => o -> m Word64
- setWebsocketConnectionMaxIncomingPayloadSize :: (MonadIO m, IsWebsocketConnection o) => o -> Word64 -> m ()
- websocketConnectionMaxIncomingPayloadSize :: AttrLabelProxy "maxIncomingPayloadSize"
- data WebsocketConnectionOriginPropertyInfo
- constructWebsocketConnectionOrigin :: (IsWebsocketConnection o, MonadIO m) => Text -> m (GValueConstruct o)
- getWebsocketConnectionOrigin :: (MonadIO m, IsWebsocketConnection o) => o -> m (Maybe Text)
- websocketConnectionOrigin :: AttrLabelProxy "origin"
- data WebsocketConnectionProtocolPropertyInfo
- constructWebsocketConnectionProtocol :: (IsWebsocketConnection o, MonadIO m) => Text -> m (GValueConstruct o)
- getWebsocketConnectionProtocol :: (MonadIO m, IsWebsocketConnection o) => o -> m (Maybe Text)
- websocketConnectionProtocol :: AttrLabelProxy "protocol"
- data WebsocketConnectionStatePropertyInfo
- getWebsocketConnectionState :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketState
- websocketConnectionState :: AttrLabelProxy "state"
- data WebsocketConnectionUriPropertyInfo
- constructWebsocketConnectionUri :: (IsWebsocketConnection o, MonadIO m) => Uri -> m (GValueConstruct o)
- getWebsocketConnectionUri :: (MonadIO m, IsWebsocketConnection o) => o -> m Uri
- websocketConnectionUri :: AttrLabelProxy "uri"
- type WebsocketConnectionClosedCallback = IO ()
- data WebsocketConnectionClosedSignalInfo
- afterWebsocketConnectionClosed :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosedCallback) -> m SignalHandlerId
- onWebsocketConnectionClosed :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosedCallback) -> m SignalHandlerId
- type WebsocketConnectionClosingCallback = IO ()
- data WebsocketConnectionClosingSignalInfo
- afterWebsocketConnectionClosing :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosingCallback) -> m SignalHandlerId
- onWebsocketConnectionClosing :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosingCallback) -> m SignalHandlerId
- type WebsocketConnectionErrorCallback = GError -> IO ()
- data WebsocketConnectionErrorSignalInfo
- afterWebsocketConnectionError :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionErrorCallback) -> m SignalHandlerId
- onWebsocketConnectionError :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionErrorCallback) -> m SignalHandlerId
- type WebsocketConnectionMessageCallback = Int32 -> Bytes -> IO ()
- data WebsocketConnectionMessageSignalInfo
- afterWebsocketConnectionMessage :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionMessageCallback) -> m SignalHandlerId
- onWebsocketConnectionMessage :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionMessageCallback) -> m SignalHandlerId
- type WebsocketConnectionPongCallback = Bytes -> IO ()
- data WebsocketConnectionPongSignalInfo
- afterWebsocketConnectionPong :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionPongCallback) -> m SignalHandlerId
- onWebsocketConnectionPong :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionPongCallback) -> m SignalHandlerId
Exported types
newtype WebsocketConnection Source #
Memory-managed wrapper type.
Constructors
WebsocketConnection (ManagedPtr WebsocketConnection) |
Instances
class (GObject o, IsDescendantOf WebsocketConnection o) => IsWebsocketConnection o Source #
Type class for types which can be safely cast to WebsocketConnection
, for instance with toWebsocketConnection
.
Instances
(GObject o, IsDescendantOf WebsocketConnection o) => IsWebsocketConnection o Source # | |
Defined in GI.Soup.Objects.WebsocketConnection |
toWebsocketConnection :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketConnection Source #
Cast to WebsocketConnection
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, close, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, sendBinary, sendMessage, sendText, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCloseCode, getCloseData, getConnectionType, getData, getExtensions, getIoStream, getKeepaliveInterval, getMaxIncomingPayloadSize, getOrigin, getProperty, getProtocol, getQdata, getState, getUri.
Setters
setData, setDataFull, setKeepaliveInterval, setMaxIncomingPayloadSize, setProperty.
type family ResolveWebsocketConnectionMethod (t :: Symbol) o where ... Source #
Equations
close
data WebsocketConnectionCloseMethodInfo Source #
Instances
(signature ~ (CUShort -> Maybe Text -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionCloseMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionCloseMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionClose Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> CUShort |
|
-> Maybe Text |
|
-> m () |
Close the connection in an orderly fashion.
Note that until the signalwebsocketConnection
[closed] signal fires, the connection
is not yet completely closed. The close message is not even sent until the
main loop runs.
The code
and data
are sent to the peer along with the close request.
If code
is WebsocketCloseCodeNoStatus
a close message with no body
(without code and data) is sent.
Note that the data
must be UTF-8 valid.
getCloseCode
data WebsocketConnectionGetCloseCodeMethodInfo Source #
Instances
(signature ~ m CUShort, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetCloseCodeMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetCloseCodeMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetCloseCode Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m CUShort | Returns: the close code or zero. |
Get the close code received from the WebSocket peer.
This only becomes valid once the WebSocket is in the
WebsocketStateClosed
state. The value will often be in the
[enumwebsocketCloseCode
] enumeration, but may also be an application
defined close code.
getCloseData
data WebsocketConnectionGetCloseDataMethodInfo Source #
Instances
(signature ~ m Text, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetCloseDataMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetCloseDataMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetCloseData Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m Text | Returns: the close data or |
Get the close data received from the WebSocket peer.
This only becomes valid once the WebSocket is in the
WebsocketStateClosed
state. The data may be freed once
the main loop is run, so copy it if you need to keep it around.
getConnectionType
data WebsocketConnectionGetConnectionTypeMethodInfo Source #
Instances
(signature ~ m WebsocketConnectionType, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetConnectionTypeMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetConnectionTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetConnectionType Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m WebsocketConnectionType | Returns: the connection type |
Get the connection type (client/server) of the connection.
getExtensions
data WebsocketConnectionGetExtensionsMethodInfo Source #
Instances
(signature ~ m [WebsocketExtension], MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetExtensionsMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetExtensionsMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetExtensions Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m [WebsocketExtension] | Returns: a |
Get the extensions chosen via negotiation with the peer.
getIoStream
data WebsocketConnectionGetIoStreamMethodInfo Source #
Instances
(signature ~ m IOStream, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetIoStreamMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetIoStreamMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetIoStream Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m IOStream | Returns: the WebSocket's I/O stream. |
Get the I/O stream the WebSocket is communicating over.
getKeepaliveInterval
data WebsocketConnectionGetKeepaliveIntervalMethodInfo Source #
Instances
(signature ~ m Word32, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetKeepaliveIntervalMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetKeepaliveIntervalMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetKeepaliveInterval Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m Word32 | Returns: the keepalive interval. |
Gets the keepalive interval in seconds or 0 if disabled.
getMaxIncomingPayloadSize
data WebsocketConnectionGetMaxIncomingPayloadSizeMethodInfo Source #
Instances
(signature ~ m Word64, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetMaxIncomingPayloadSizeMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetMaxIncomingPayloadSizeMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetMaxIncomingPayloadSize Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m Word64 | Returns: the maximum payload size. |
Gets the maximum payload size allowed for incoming packets.
getOrigin
data WebsocketConnectionGetOriginMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetOriginMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetOriginMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetOrigin Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m (Maybe Text) | Returns: the origin |
Get the origin of the WebSocket.
getProtocol
data WebsocketConnectionGetProtocolMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetProtocolMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetProtocolMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetProtocol Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m (Maybe Text) | Returns: the chosen protocol |
Get the protocol chosen via negotiation with the peer.
getState
data WebsocketConnectionGetStateMethodInfo Source #
Instances
(signature ~ m WebsocketState, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetStateMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetStateMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetState Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m WebsocketState | Returns: the state |
Get the current state of the WebSocket.
getUri
data WebsocketConnectionGetUriMethodInfo Source #
Instances
(signature ~ m Uri, MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionGetUriMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionGetUriMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionGetUri Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> m Uri | Returns: the URI |
Get the URI of the WebSocket.
For servers this represents the address of the WebSocket, and for clients it is the address connected to.
new
websocketConnectionNew Source #
Arguments
:: (HasCallStack, MonadIO m, IsIOStream a, IsWebsocketExtension b) | |
=> a |
|
-> Uri |
|
-> WebsocketConnectionType |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> [b] |
|
-> m WebsocketConnection | Returns: a new |
Creates a WebsocketConnection
on stream
with the given active extensions
.
This should be called after completing the handshake to begin using the WebSocket protocol.
sendBinary
data WebsocketConnectionSendBinaryMethodInfo Source #
Instances
(signature ~ (Maybe ByteString -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionSendBinaryMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionSendBinaryMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionSendBinary Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> Maybe ByteString |
|
-> m () |
Send a binary message to the peer.
If length
is 0, data
may be Nothing
.
The message is queued to be sent and will be sent when the main loop is run.
sendMessage
data WebsocketConnectionSendMessageMethodInfo Source #
Instances
(signature ~ (WebsocketDataType -> Bytes -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionSendMessageMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionSendMessageMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionSendMessage Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> WebsocketDataType |
|
-> Bytes |
|
-> m () |
Send a message of the given type
to the peer. Note that this method,
allows to send text messages containing Nothing
characters.
The message is queued to be sent and will be sent when the main loop is run.
sendText
data WebsocketConnectionSendTextMethodInfo Source #
Instances
(signature ~ (Text -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionSendTextMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionSendTextMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionSendText Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> Text |
|
-> m () |
setKeepaliveInterval
data WebsocketConnectionSetKeepaliveIntervalMethodInfo Source #
Instances
(signature ~ (Word32 -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionSetKeepaliveIntervalMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionSetKeepaliveIntervalMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionSetKeepaliveInterval Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the interval in seconds on when to send a ping message which will serve as a keepalive message.
If set to 0 the keepalive message is disabled.
setMaxIncomingPayloadSize
data WebsocketConnectionSetMaxIncomingPayloadSizeMethodInfo Source #
Instances
(signature ~ (Word64 -> m ()), MonadIO m, IsWebsocketConnection a) => OverloadedMethod WebsocketConnectionSetMaxIncomingPayloadSizeMethodInfo a signature Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo WebsocketConnectionSetMaxIncomingPayloadSizeMethodInfo (a :: Type) Source # | |
Defined in GI.Soup.Objects.WebsocketConnection Methods |
websocketConnectionSetMaxIncomingPayloadSize Source #
Arguments
:: (HasCallStack, MonadIO m, IsWebsocketConnection a) | |
=> a |
|
-> Word64 |
|
-> m () |
Sets the maximum payload size allowed for incoming packets.
It does not limit the outgoing packet size.
Properties
connectionType
The type of connection (client/server).
data WebsocketConnectionConnectionTypePropertyInfo Source #
Instances
constructWebsocketConnectionConnectionType :: (IsWebsocketConnection o, MonadIO m) => WebsocketConnectionType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “connection-type
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionConnectionType :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketConnectionType Source #
Get the value of the “connection-type
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #connectionType
websocketConnectionConnectionType :: AttrLabelProxy "connectionType" Source #
extensions
List of [classwebsocketExtension
] objects that are active in the connection.
data WebsocketConnectionExtensionsPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionExtensionsPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionExtensionsPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionExtensionsPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionExtensionsPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionExtensionsPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo o => o -> AttrGetType WebsocketConnectionExtensionsPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionExtensionsPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionExtensions :: (IsWebsocketConnection o, MonadIO m) => Ptr () -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “extensions
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionExtensions :: (MonadIO m, IsWebsocketConnection o) => o -> m (Ptr ()) Source #
Get the value of the “extensions
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #extensions
websocketConnectionExtensions :: AttrLabelProxy "extensions" Source #
ioStream
The underlying IO stream the WebSocket is communicating over.
The input and output streams must be pollable streams.
data WebsocketConnectionIoStreamPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionIoStreamPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionIoStreamPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionIoStreamPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionIoStreamPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionIoStreamPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo o => o -> AttrGetType WebsocketConnectionIoStreamPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionIoStreamPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionIoStream :: (IsWebsocketConnection o, MonadIO m, IsIOStream a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “io-stream
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionIoStream :: (MonadIO m, IsWebsocketConnection o) => o -> m IOStream Source #
Get the value of the “io-stream
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #ioStream
websocketConnectionIoStream :: AttrLabelProxy "ioStream" Source #
keepaliveInterval
Interval in seconds on when to send a ping message which will serve as a keepalive message.
If set to 0 the keepalive message is disabled.
data WebsocketConnectionKeepaliveIntervalPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionKeepaliveIntervalPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionKeepaliveIntervalPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo o => o -> AttrGetType WebsocketConnectionKeepaliveIntervalPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionKeepaliveIntervalPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionKeepaliveInterval :: (IsWebsocketConnection o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “keepalive-interval
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionKeepaliveInterval :: (MonadIO m, IsWebsocketConnection o) => o -> m Word32 Source #
Get the value of the “keepalive-interval
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #keepaliveInterval
setWebsocketConnectionKeepaliveInterval :: (MonadIO m, IsWebsocketConnection o) => o -> Word32 -> m () Source #
Set the value of the “keepalive-interval
” property.
When overloading is enabled, this is equivalent to
set
websocketConnection [ #keepaliveInterval:=
value ]
websocketConnectionKeepaliveInterval :: AttrLabelProxy "keepaliveInterval" Source #
maxIncomingPayloadSize
The maximum payload size for incoming packets.
The protocol expects or 0 to not limit it.
data WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source #
Instances
AttrInfo WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o => o -> IO (AttrGetType WebsocketConnectionMaxIncomingPayloadSizePropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o, AttrSetTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o, AttrSetTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionMaxIncomingPayloadSizePropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo o => o -> AttrGetType WebsocketConnectionMaxIncomingPayloadSizePropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionMaxIncomingPayloadSizePropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionMaxIncomingPayloadSize :: (IsWebsocketConnection o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “max-incoming-payload-size
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionMaxIncomingPayloadSize :: (MonadIO m, IsWebsocketConnection o) => o -> m Word64 Source #
Get the value of the “max-incoming-payload-size
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #maxIncomingPayloadSize
setWebsocketConnectionMaxIncomingPayloadSize :: (MonadIO m, IsWebsocketConnection o) => o -> Word64 -> m () Source #
Set the value of the “max-incoming-payload-size
” property.
When overloading is enabled, this is equivalent to
set
websocketConnection [ #maxIncomingPayloadSize:=
value ]
websocketConnectionMaxIncomingPayloadSize :: AttrLabelProxy "maxIncomingPayloadSize" Source #
origin
The client's Origin.
data WebsocketConnectionOriginPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionOriginPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionOriginPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionOriginPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionOriginPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionOriginPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo o => o -> AttrGetType WebsocketConnectionOriginPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionOriginPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionOrigin :: (IsWebsocketConnection o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “origin
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionOrigin :: (MonadIO m, IsWebsocketConnection o) => o -> m (Maybe Text) Source #
Get the value of the “origin
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #origin
websocketConnectionOrigin :: AttrLabelProxy "origin" Source #
protocol
The chosen protocol, or Nothing
if a protocol was not agreed
upon.
data WebsocketConnectionProtocolPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionProtocolPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionProtocolPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionProtocolPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionProtocolPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionProtocolPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo o => o -> AttrGetType WebsocketConnectionProtocolPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionProtocol :: (IsWebsocketConnection o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “protocol
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionProtocol :: (MonadIO m, IsWebsocketConnection o) => o -> m (Maybe Text) Source #
Get the value of the “protocol
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #protocol
websocketConnectionProtocol :: AttrLabelProxy "protocol" Source #
state
The current state of the WebSocket.
data WebsocketConnectionStatePropertyInfo Source #
Instances
AttrInfo WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o => o -> IO (AttrGetType WebsocketConnectionStatePropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o, AttrSetTypeConstraint WebsocketConnectionStatePropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o, AttrSetTypeConstraint WebsocketConnectionStatePropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionStatePropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionStatePropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo o => o -> AttrGetType WebsocketConnectionStatePropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionStatePropertyInfo Source # | |||||||||||||||||||||||||||||||||
getWebsocketConnectionState :: (MonadIO m, IsWebsocketConnection o) => o -> m WebsocketState Source #
Get the value of the “state
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #state
websocketConnectionState :: AttrLabelProxy "state" Source #
uri
The URI of the WebSocket.
For servers this represents the address of the WebSocket, and for clients it is the address connected to.
data WebsocketConnectionUriPropertyInfo Source #
Instances
AttrInfo WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods attrGet :: AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o => o -> IO (AttrGetType WebsocketConnectionUriPropertyInfo) # attrSet :: (AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionUriPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o, AttrSetTypeConstraint WebsocketConnectionUriPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o, AttrTransferTypeConstraint WebsocketConnectionUriPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType WebsocketConnectionUriPropertyInfo) # attrPut :: AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo o => o -> AttrGetType WebsocketConnectionUriPropertyInfo -> IO () # | |||||||||||||||||||||||||||||||||
type AttrAllowedOps WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrBaseTypeConstraint WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrGetType WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrLabel WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Soup.Objects.WebsocketConnection | |||||||||||||||||||||||||||||||||
type AttrOrigin WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrSetTypeConstraint WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferType WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
type AttrTransferTypeConstraint WebsocketConnectionUriPropertyInfo Source # | |||||||||||||||||||||||||||||||||
constructWebsocketConnectionUri :: (IsWebsocketConnection o, MonadIO m) => Uri -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “uri
” property. This is rarely needed directly, but it is used by new
.
getWebsocketConnectionUri :: (MonadIO m, IsWebsocketConnection o) => o -> m Uri Source #
Get the value of the “uri
” property.
When overloading is enabled, this is equivalent to
get
websocketConnection #uri
websocketConnectionUri :: AttrLabelProxy "uri" Source #
Signals
closed
type WebsocketConnectionClosedCallback = IO () Source #
Emitted when the connection has completely closed.
This happens either due to an orderly close from the peer, one
initiated via [methodwebsocketConnection
.close] or a fatal error
condition that caused a close.
This signal will be emitted once.
data WebsocketConnectionClosedSignalInfo Source #
Instances
SignalInfo WebsocketConnectionClosedSignalInfo Source # | |||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType WebsocketConnectionClosedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType WebsocketConnectionClosedSignalInfo Source # | |||||
afterWebsocketConnectionClosed :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
websocketConnection #closed callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWebsocketConnectionClosed :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
websocketConnection #closed callback
closing
type WebsocketConnectionClosingCallback = IO () Source #
This signal will be emitted during an orderly close.
data WebsocketConnectionClosingSignalInfo Source #
Instances
SignalInfo WebsocketConnectionClosingSignalInfo Source # | |||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType WebsocketConnectionClosingSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType WebsocketConnectionClosingSignalInfo Source # | |||||
afterWebsocketConnectionClosing :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closing signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
websocketConnection #closing callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWebsocketConnectionClosing :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionClosingCallback) -> m SignalHandlerId Source #
Connect a signal handler for the closing signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
websocketConnection #closing callback
error
type WebsocketConnectionErrorCallback Source #
Emitted when an error occurred on the WebSocket.
This may be fired multiple times. Fatal errors will be followed by
the signalwebsocketConnection
[closed] signal being emitted.
data WebsocketConnectionErrorSignalInfo Source #
Instances
SignalInfo WebsocketConnectionErrorSignalInfo Source # | |||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType WebsocketConnectionErrorSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType WebsocketConnectionErrorSignalInfo Source # | |||||
afterWebsocketConnectionError :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionErrorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the error signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
websocketConnection #error callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWebsocketConnectionError :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionErrorCallback) -> m SignalHandlerId Source #
Connect a signal handler for the error signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
websocketConnection #error callback
message
type WebsocketConnectionMessageCallback Source #
Emitted when we receive a message from the peer.
As a convenience, the message
data will always be
Nothing
-terminated, but the NUL byte will not be included in
the length count.
data WebsocketConnectionMessageSignalInfo Source #
Instances
SignalInfo WebsocketConnectionMessageSignalInfo Source # | |||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType WebsocketConnectionMessageSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType WebsocketConnectionMessageSignalInfo Source # | |||||
afterWebsocketConnectionMessage :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionMessageCallback) -> m SignalHandlerId Source #
Connect a signal handler for the message signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
websocketConnection #message callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWebsocketConnectionMessage :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionMessageCallback) -> m SignalHandlerId Source #
Connect a signal handler for the message signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
websocketConnection #message callback
pong
type WebsocketConnectionPongCallback Source #
Emitted when we receive a Pong frame (solicited or unsolicited) from the peer.
As a convenience, the message
data will always be
Nothing
-terminated, but the NUL byte will not be included in
the length count.
data WebsocketConnectionPongSignalInfo Source #
Instances
SignalInfo WebsocketConnectionPongSignalInfo Source # | |||||
Defined in GI.Soup.Objects.WebsocketConnection Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType WebsocketConnectionPongSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
type HaskellCallbackType WebsocketConnectionPongSignalInfo Source # | |||||
afterWebsocketConnectionPong :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionPongCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pong signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
websocketConnection #pong callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWebsocketConnectionPong :: (IsWebsocketConnection a, MonadIO m) => a -> ((?self :: a) => WebsocketConnectionPongCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pong signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
websocketConnection #pong callback