max-mapper / websocket-stream

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

Assumes it's a server? broken as a browser client? #74

Closed andywatts closed 8 years ago

andywatts commented 9 years ago

index.js requires server.js server.js creates a ws server instance. This is undefined when in a browser. server.js then tries to inherit prototypes from this undefined WebSocketServer. This inherit throws an error.

test-client isn't capturing this.

mcollina commented 9 years ago

How are you building the browserify bundle for this library?

This is working fine for me in mqtt.

andywatts commented 9 years ago

Using beefy, which in turn uses browserify. beefy demo.js:bundle.js

Actually trying to update maxogden/voxel-client. It's pinned to websocket-stream v0.0.5 Get the 'undefined' error when I update voxel-client to use websocket-stream v2.0.2

andywatts commented 8 years ago

Apologies. This was due to old beefy/browserify