max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
667 stars 114 forks source link

"stream" vs "connection" #77

Open gritzko opened 8 years ago

gritzko commented 8 years ago

https://github.com/maxogden/websocket-stream/blob/master/server.js#L18

FYI, we had to do the opposite trick: "connection" is a standard event we expect from a server, so https://github.com/gritzko/stream-url-ws/blob/master/index.js#L21

Probably you should emit both?

egirshov commented 8 years ago

The server already emits both "connection" event (with a plain websocket) and a custom "stream" event.