public static void Play(string Name) { if (_ws == null) { return; } byte[] nickPacket = new byte[1 + (2 * Name.Length)]; nickPacket[0] = 0; for (int i = 0; i < Name.Length; ++i) { nickPacket.SetUInt16(1 + 2 * i, Convert.ToUInt16(Name[i])); } _ws.SendMessage(nickPacket); }
public static void Connect(WebSocketWrapper wrapper) { byte[] handshake = new byte[5]; handshake[0] = 255; handshake.SetUInt32(1, 1); wrapper.SendMessage(handshake); _connected = true; }
public static void Connect(WebSocketWrapper wrapper) { byte[] handshake = new byte[5]; handshake[0] = 255; handshake.SetUInt32(1, 1); wrapper.SendMessage(handshake); _connected = true; }