コード例 #1
0
ファイル: NativePlatform.cs プロジェクト: Barnaff/Chromania
 public override IGameSparksWebSocket GetSocket(string url, Action<string> messageReceived, Action closed, Action opened, Action<string> error)
 {
     var socket = new NativeWebSocket();
     socket.Initialize(url, messageReceived, closed, opened, error);
     socket.SetController(webSocketController);
     socket.Open();
     return socket;
 }
コード例 #2
0
        public override IGameSparksWebSocket GetBinarySocket(string url, Action <byte[]> binaryMessageReceived, Action closed, Action opened, Action <string> error)
        {
            var socket = new NativeWebSocket();

            socket.Initialize(url, binaryMessageReceived, closed, opened, error);
            socket.SetController(webSocketController);
            return(socket);
        }