Table of Contents

Class EngineIOPacket

Namespace
Firesplash.GameDevAssets.SocketIOPlus.EngineIO
Assembly
Firesplash.GameDevAssets.SocketIOPlus.dll

Class used to create a packet to be sent via WebSocket to a server using the Engine.IO protocol

public class EngineIOPacket
Inheritance
EngineIOPacket

Constructors

EngineIOPacket(byte[])

Creates a packet for a binary-typed MESSAGE This can not be used to parse an incoming message!

public EngineIOPacket(byte[] messagePayload)

Parameters

messagePayload byte[]

EngineIOPacket(string)

Creates a packet for a string-typed MESSAGE This can not be used to parse an incoming message!

public EngineIOPacket(string messagePayload)

Parameters

messagePayload string

Methods

GetPacketType()

public DataTypes.EIOPacketType GetPacketType()

Returns

DataTypes.EIOPacketType

GetPayloadBytes()

public byte[] GetPayloadBytes()

Returns

byte[]

GetPayloadString()

public string GetPayloadString()

Returns

string

IsBinaryMessage()

public bool IsBinaryMessage()

Returns

bool

Parse(bool, byte[])

Used to parse a received byte array from the transport into an Engine.IO packet

public static EngineIOPacket Parse(bool isBinaryMessage, byte[] webSocketMessageBytes)

Parameters

isBinaryMessage bool

Set this true, if the message was received as binary message. Otherwise false.

webSocketMessageBytes byte[]

The received byte array

Returns

EngineIOPacket

The parsed package instance