public void SendAsync(byte[] packet) { #if DOT_NET #elif UNITY_WEBGL && !UNITY_EDITOR NativeWebSocket.SendAsync(packet); #else WebSocket.SendAsync(packet, null); #endif }
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 }
public void SendAsync(byte[] packet) { Debug.Log("[UnityWebSocket] Sending message."); #if UNITY_EDITOR || UNITY_STANDALONE WebSocket.SendAsync(packet, null); #elif UNITY_WEBGL NativeWebSocket.SendAsync(packet); #endif }