Changelog: - Added Connection.broadcast, which sends to all connected clients, except the sending client. - Renamed Connection._id to Connection.id, to be consistent with the Manager's naming. - Modified echo-server example to also serve up the client.html by default. - Added the ability to pass in a http.Server instance into ws.createServer() or new ws.Server() as the second parameter. - Switched to framing packets with \x00 and \xff instead of \u0000 and \uffff. - Switched to using Array.isArray for checking if a variable is an array, as it's much cleaner and faster then a typeof check. - Fixed issue #7 with the dead connections hanging around or a connection being wrongfully deleted. - Added support for the broken head case, even though this is actually against current spec, it may be changed.
…is was out of spec, and not fully functional.
- EchoServer example now also servers the client for you. This changeset means that node-websocket-server can hijack a http.Server from say, Connect, and serve up websockets when needed and let Connect do the rest.
…isArray is more reliable and faster
…, client._state threw an error.
Changelog: - Moved to linked lists for managing connections. - Rewrote packet parser, it's now much more robust - Removed old server files. - Renamed server#close -> server#shutdown, this is emitted on server.close(); - Added server#close(connection) event to allow you to write connection close handlers at the server level. - Added server.send(client_id, data) for sending data to only one client. - Restructured a lot of the internal code to be much tidier.
…rrently adds clients, allows searching, and forEach'ing them
…ing of messages to the connected clients.
…nd start over
…f: commit more regularly.
…g on clients, this will enable an 'auto' mode on the server, so that it'll switch automatically between draft75 and draft76+ dependent on the headers the client sends.
…ttached clients. This will shortly be followed by route.broadcast, after I rewrite the code for the route and connection constructors