Пример #1
0
        public void SendAsync(byte[] packet)
        {
#if DOT_NET
#elif UNITY_WEBGL && !UNITY_EDITOR
            NativeWebSocket.SendAsync(packet);
#else
            WebSocket.SendAsync(packet, null);
#endif
        }
Пример #2
0
        public void SendAsync(byte[] packet)
        {
#if DOT_NET
            ClientWebSocket.SendAsync(new ArraySegment <byte>(packet), WebSocketMessageType.Binary, false, CancellationToken.None);
#elif UNITY_WEBGL && !UNITY_EDITOR
            NativeWebSocket.SendAsync(packet);
#else
            WebSocket.SendAsync(packet, null);
#endif
        }