public function write($data, array $options = [])
    {
        $message_array = ['message' => $this->_serializeMessage($data)];
        if (array_key_exists('flags', $options)) {
            $message_array['flags'] = $options['flags'];
        }
        $this->call->startBatch([
            OP_SEND_MESSAGE => $message_array,
        ]);
    }
public function write($data, array $options = [])
    {
        $message_array = ['message' => $this->_serializeMessage($data)];
        if (array_key_exists('flags', $options)) {
            $message_array['flags'] = $options['flags'];
        }
        $this->call->startBatch([
            OP_SEND_MESSAGE => $message_array,
        ]);
    }
public function write ( $ data , array $ options = [ ] ) { $ message_array = [ 'message' => $ this -> _serializeMessage ( $ data ) ] ; if ( array_key_exists ( 'flags' , $ options ) ) { $ message_array [ 'flags' ] = $ options [ 'flags' ] ; } $ this -> call -> startBatch ( [ OP_SEND_MESSAGE => $ message_array , ] ) ; }
Write a single message to the server. This cannot be called after
wait is called.

@param ByteBuffer $data    The data to write
@param array      $options An array of options, possible keys:
'flags' => a number (optional)
Write a single message to the server . This cannot be called after wait is called .