Class SocketMessage
A Socket.IO protocol message.
Inheritance
System.Object
SocketMessage
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 |
|---|---|---|
| SocketMessageType | type | Type of SocketIO message. |
| System.Nullable<System.UInt32> | id | ID of the message in case of events. |
| Newtonsoft.Json.Linq.JToken | payload | Raw JSON payload. |
| System.Int32 | 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.Int32 |
ID
ID of the message in case of events.
Declaration
public uint? ID { get; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.UInt32> |
Payload
Raw JSON payload.
Declaration
public JToken Payload { get; }
Property Value
| Type | Description |
|---|---|
| Newtonsoft.Json.Linq.JToken |
Type
Type of SocketIO message.
Declaration
public SocketMessageType Type { get; }
Property Value
| Type | Description |
|---|---|
| SocketMessageType |
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.String | rawMessage | Message text. |
Returns
| Type | Description |
|---|---|
| SocketMessage | Parsed message |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.Object.ToString()