webRTC-io / webRTC.io

An abstraction layer for webRTC. Aim is to simplify the HTML5 web standard webRTC in a similar manner to socket.io w/ websockets. Highly experimental technology
1.6k stars 293 forks source link

Avoid conflicts with other WebSocketServer's by enabling more options. #31

Closed ghost closed 1 year ago

ghost commented 11 years ago

webRTC accepted one parameter to it's listen method, which value could be either a port or a httpServer. The parameter were checked for type, and then either the option(s) { server: parameter } or { port: parameter } were sent to ws.WebSocketServer constructor.

To enable more options (in this case the path option was wanted to avoid conflicts with other websocket servers) and also re-use the option parsing in WebSocketServer, the listen method now accepts an options object, which it then directly passes on to the WebSocketServer constructor.

sarenji commented 11 years ago

That makes sense. @dennismartensson @cavedweller opinions?

dennismartensson commented 11 years ago

I think it looks good!