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; }
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); }