5 Commits
Author SHA1 Message Date
James Coglan ffa0aa3a8f Convert numbers to strings when sending frames.
In draft-75/76, passing a number to text() or frame() results in the
sender allocating a buffer of that size and sending it to the other
peer, leaking random blocks of memory.

In hybi, a call to text(), binary() or ping() with a number will fail,
because the input is expected to be a buffer and so an internal method
call fails.

Both kinds of driver now convert numbers to strings, which is what
browsers do with calls to send().
2016-01-06 23:12:44 +00:00
James Coglan 4a3d51cc5b Incorporate StreamReader into Draft75 so that it retains input and recovers safely from exceptions in event listeners. 2015-07-07 21:30:06 +01:00
James Coglan dfe7b2b000 Trailing blank lines are bad. 2014-05-17 00:35:31 +01:00
James Coglan c5b3df986b Migrate to jstest. 2013-07-01 02:10:29 +01:00
James Coglan 25c075a408 Rename the module to websocket-driver. 2013-05-04 16:42:44 +01:00