public Packet(EnginePacketType enginePacketType, SocketPacketType socketPacketType, int attachments, string nsp, int id, JSONNode json) { this.enginePacketType = enginePacketType; this.socketPacketType = socketPacketType; this.attachments = attachments; this.nsp = nsp; this.id = id; this.json = json; }
public Packet(string eventName, JSONObject data) { this.enginePacketType = EnginePacketType.MESSAGE; this.socketPacketType = SocketPacketType.EVENT; this.attachments = 0; this.nsp = "/"; this.id = -1; this.json = new JSONObject(string.Format("[\"{0}\",{1}]", eventName, data)); }
public Packet(EnginePacketType enginePacketType, SocketPacketType socketPacketType, int attachments, string nsp, int id, JSONObject json) { this.enginePacketType = enginePacketType; this.socketPacketType = socketPacketType; this.attachments = attachments; this.nsp = nsp; this.id = id; this.json = json; }
public Packet(EnginePacketType enginePacketType, SocketPacketType socketPacketType, int packetAttachementsCount, string packetNamespace, int packetID, JSONObject packetData) { this.EnginePacketType = enginePacketType; this.SocketPacketType = socketPacketType; this.PacketAttachmentsCount = packetAttachementsCount; this.PacketNamespace = packetNamespace; this.PacketID = packetID; this.PacketData = packetData; }
public Packet( EnginePacketType enginePacketType = EnginePacketType.Unknown, SocketPacketType socketPacketType = SocketPacketType.Unknown, int attachments = -1, string nsp = "/", int id = -1, JSONObject json = null) { this.enginePacketType = enginePacketType; this.socketPacketType = socketPacketType; this.attachments = attachments; this.nsp = nsp; this.id = id; this.json = json; }