public void SendPackets(DebugWebSocket socket) { foreach (var packet in m_PacketQueue) { if (packet.stringData != null) { socket.SendText(packet.stringData); } else { socket.SendBinary(packet.binaryData, 0, packet.binarySize); if (packet.binaryData.Length == m_MaxPacketSize) { m_PacketPool.Add(packet.binaryData); } } } m_PacketQueue.Clear(); }
protected override void OnCreate() { m_Socket = new DebugWebSocket(0); }