HttpServer server; server.listen((request) { if (...) { WebSocketTransformer.upgrade(request).then((websocket) { ... }); } else { // Do normal HTTP request processing. } });
and When I should use this code:server.transform(new WebSocketTransformer()).listen((webSocket) => ...);
Assume I want to stream vedio from server side to client side?!