WebsocketConnection.connectMessage

Connect to Message signal.

Emitted when we receive a message from the peer.

As a convenience, the message data will always be null-terminated, but the NUL byte will not be included in the length count.

class WebsocketConnection
ulong
connectMessage
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == int)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] == glib.bytes.Bytes)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 4
)

Parameters

callback T

signal callback delegate or function to connect

void callback(int type, glib.bytes.Bytes message, soup.websocket_connection.WebsocketConnection websocketConnection)

type the type of message contents (optional)

message the message data (optional)

websocketConnection the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID