Class SocketMessage
A Socket.IO protocol message.
Namespace: TehGM.Wolfringo.Socket
Assembly: Wolfringo.Core.dll
Syntax
public class SocketMessage
Constructors
| Improve this Doc View SourceSocketMessage(SocketMessageType, Nullable<UInt32>, JToken, Int32)
Creates a new Socket.IO protocol message.
Declaration
public SocketMessage(SocketMessageType type, uint? id, JToken payload, int binaryCount = 0)
Parameters
Type | Name | Description |
---|---|---|
Socket |
type | Type of SocketIO message. |
System. |
id | ID of the message in case of events. |
Newtonsoft. |
payload | Raw JSON payload. |
System. |
binaryCount | Count of binary messages that will be sent after this message. |
Properties
| Improve this Doc View SourceBinaryMessagesCount
Count of binary messages that will be sent after this message.
Declaration
public int BinaryMessagesCount { get; }
Property Value
Type | Description |
---|---|
System. |
ID
ID of the message in case of events.
Declaration
public uint? ID { get; }
Property Value
Type | Description |
---|---|
System. |
Payload
Raw JSON payload.
Declaration
public JToken Payload { get; }
Property Value
Type | Description |
---|---|
Newtonsoft. |
Type
Type of SocketIO message.
Declaration
public SocketMessageType Type { get; }
Property Value
Type | Description |
---|---|
Socket |
Methods
| Improve this Doc View SourceParse(String)
Parses raw message text from stream.
Declaration
public static SocketMessage Parse(string rawMessage)
Parameters
Type | Name | Description |
---|---|---|
System. |
rawMessage | Message text. |
Returns
Type | Description |
---|---|
Socket |
Parsed message |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
Overrides
System.Object.ToString()