code: function init(ws, req, stream) {  // {{{2
  /**
   * Class constructor.
   *
   * @param entry {Object} Entry
   *
   * @method constructor
   */
  
    this._state = O.link.socketState.OPENED;
    this._lid = req.newLid;
    this._ws = ws;
    this._ws.links[this._lid.toString(16)] = this;
  
    ws.tx({
      type: 'open',
      lid: this._lid,
    });
  
    this.stream = stream;
    stream.setEncoding('hex');
    stream.on('error', onError.bind(this));
    stream.on('data', onData.bind(this));
    stream.on('end', onEnd.bind(this));
  }
docs: @caption WebSocket write stream socket
  
  @readme
  Relays readable stream to a peer.
  
  @class ose.lib.ws.writable
  @type class
   Public {{{1