HttpsServer server = new HttpsServer();
WebSocketHandler wsHandler = new WebSocketHandler();
wsHandler.onOpen = new ChatHandler(basePath).onOpen;
SecureServerSocket sock = new SecureServerSocket('127.0.0.1', port, 128, 'CN=localhost');
server.defaultRequestHandler = new StaticFileHandler(basePath).onRequest;
server.addRequestHandler((req) => req.path == "/ws", wsHandler.onRequest);
server.onError = (error) => print(error);
server.listenOn(sock);
I tried:var client = new HttpClient(),conn = new WebSocketClientConnection(client.getUrl(new Uri.fromString('https://...')));conn.onMessage = (msg) {print(msg);};conn.onOpen = () {conn.send('hello');};
and get the following error:Unhandled exception:UnimplementedError: SecureSocket.available not implemented yet#0 _SecureSocket.available (dart:io:7343:5)#1 _WebSocketConnectionBase._startProcessing.<anonymous closure> (dart:io:8086:40)#2 _SecureSocket._secureDataHandler._secureDataHandler (dart:io:7478:29)#3 _SocketBase._multiplex (dart:io-patch:410:26)#4 _SocketBase._sendToEventHandler.<anonymous closure> (dart:io-patch:512:20)#5 _ReceivePortImpl._handleMessage (dart:isolate-patch:40:92)any ideas?-g.
--
--
var client = new HttpClient(),conn = new WebSocketClientConnection(client.getUrl(new Uri.fromString('https://...')));conn.onMessage = (msg) {print(msg);};conn.onOpen = () {conn.send('hello');};
--
With the latest Editor/SDK version 0.3.1_r17463 on both Windows and Linux, and could not reproduce the problem. On what exact version of the SDK are you seeing this problem?