Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start experimental version for WebSocket #73 (API changed) #80

Open
bsjung opened this issue Feb 2, 2020 · 0 comments
Open

Start experimental version for WebSocket #73 (API changed) #80

bsjung opened this issue Feb 2, 2020 · 0 comments

Comments

@bsjung
Copy link

bsjung commented Feb 2, 2020

I've already commented on WebSocket v0.4.0 at #73.
But, I've changed the onMessage() into onMessage (stream object).


app.ws('/socket').listen((socket) {

  socket.onMessage.listen((data) {
    print('data: $data');
    socket.send(data);
  });

  socket.onOpen.listen((ws) {
    print('new socket opened');
  });

  socket.onClose.listen((ws) {
    print('socket has been closed');
  });

});

Thus, I've made expremental start v0.5.0 on github.
https://github.com/bsjung/start.

And I've made start web frame examples.
https://github.com/bsjung/start_examples.

Benjamin Jung (bsjung@gmail.com)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant