- Fixed: parsing error when
Connection
header uses ',' instead of ', ' (with space) #46 - Fixed: uses Buffer.alloc and Buffer.from instead of new Buffer
- Changed: Drop support for Node v0.12
- Fixed: two errors were emitted when trying to sendText to a closed connection while there was another pending binary write operation.
- Added: emit
Connection#error
event on invalid handshake response with the reason why it was rejected - Added: support for protocol negotiation
- Added:
validProtocols
andselectProtocol
options tows.createServer()
- Added:
protocols
option tows.connect
- Added:
Connection#protocols
andConnection#protocol
- Added:
Server#close
as a short hand forServer#socket.close
- Added:
Connection#send
as a short hand forConnection#sendText
orConnection#sendBinary
, depending on the data type (string or Buffer)
- Added: example to README
- Added:
extraHeaders
option inws.connect(URL, [options], [callback])
to let one add custom headers to the HTTP handshake request
- Added:
Connection#sendPing([data=''])
- Added:
pong(data)
event