API

This supports the send() and onmessage() APIs. The WebSocket object will
also emit data events that are node Buffer objects, in case you want to
work with something lower-level than strings.

Transports

Multiple transports are supported, indicated by the scheme provided to the
WebSocket constructor. ws:// is a standard TCP-based Web Socket;
ws+unix:// allows connection to a UNIX socket at the given path.