code: function write(socket, task, id, fn) {
    session[binary ? 'binary' : 'utf8'](task.size, function message(err, data) {
      var start = socket.last = Date.now();
  
      socket.send(data, {
        binary: binary,
        mask: masked
      }, function sending(err) {
        if (err) {
          process.send({ type: 'error', message: err.message, concurrent: --concurrent, id: id });
  
          socket.close();
          delete connections[id];
        }
  
        if (fn) fn(err);
      });
    });
  }
docs: Helper function from writing messages to the socket.
  
  @param {WebSocket} socket WebSocket connection we should write to
  @param {Object} task The given task
  @param {String} id
  @param {Function} fn The callback
  @api private