NetTransport.prototype.write = function (data, callback) {
  if (!this._socket) {
    throw new errors.TransportError('Socket not connected');
  }