Skip to content

Instantly share code, notes, and snippets.

@shameemreza
Created August 18, 2020 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shameemreza/358927ba1c68dd1b87d9657e8a60893a to your computer and use it in GitHub Desktop.
Save shameemreza/358927ba1c68dd1b87d9657e8a60893a to your computer and use it in GitHub Desktop.
WebSocket.connect('ws://demos.kaazing.com/echo').
then((WebSocket webSocket) {
webSocket.listen(print, onError: print);
webSocket.add('hello');
webSocket.add('world');
webSocket.close();
}).catchError(print);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment