code: function(self, message) {
    var msgHeader = parseHeader(message);
    if (msgHeader.opCode === OP_COMPRESSED) {
      msgHeader.fromCompressed = true;
      var index = MESSAGE_HEADER_SIZE;
      msgHeader.opCode = message.readInt32LE(index);
      index += 4;
      msgHeader.length = message.readInt32LE(index);
      index += 4;
      var compressorID = message[index];
      index++;
      decompress(compressorID, message.slice(index), function(err, decompressedMsgBody) {
        if (err) {
          throw err;
        }
        if (decompressedMsgBody.length !== msgHeader.length) {
          throw new Error(
            'Decompressing a compressed message from the server failed. The message is corrupt.'
          );
        }
        self.messageHandler(
          new Response(self.bson, message, msgHeader, decompressedMsgBody, self.responseOptions),
          self
        );
      });
    } else {
      self.messageHandler(
        new Response(
          self.bson,
          message,
          msgHeader,
          message.slice(MESSAGE_HEADER_SIZE),
          self.responseOptions
        ),
        self
      );
    }
  }
docs: Handle a message once it is received