public function write_handshake_request(AvroIOBinaryEncoder $encoder)
  {
    if ($this->transceiver->is_connected())
      return;
    
    $remote_name = $this->transceiver->remote_name();
    
    $local_hash = $this->local_protocol->md5();
    $remote_hash = (!isset($this->remote_hash[$remote_name])) ? null : $this->remote_hash[$remote_name];
    if (is_null($remote_hash)) {
      $remote_hash = $local_hash;
      $this->remote = $this->local_protocol;
    } else {
      $this->remote = $this->remote_protocol[$remote_name];
    }
    
    $request_datum = array('clientHash' => $local_hash, 'serverHash' => $remote_hash, 'meta' => null);
    $request_datum["clientProtocol"] = ($this->send_protocol) ? $this->local_protocol->__toString() : null;
    
    $this->handshake_requestor_writer->write($request_datum, $encoder);
  }