예제 #1
0
 public function __construct(AvroProtocol $local_protocol)
 {
     $this->local_protocol = $local_protocol;
     $this->local_hash = $local_protocol->md5();
     $this->protocol_cache[$this->local_hash] = $this->local_protocol;
     $this->handshake_responder_writer = new AvroIODatumWriter(AvroSchema::parse(HANDSHAKE_RESPONSE_SCHEMA_JSON));
     $this->handshake_responder_reader = new AvroIODatumReader(AvroSchema::parse(HANDSHAKE_REQUEST_SCHEMA_JSON));
     $this->meta_writer = new AvroIODatumWriter(AvroSchema::parse('{"type": "map", "values": "bytes"}'));
     $this->meta_reader = new AvroIODatumReader(AvroSchema::parse('{"type": "map", "values": "bytes"}'));
     $this->system_error_schema = AvroSchema::parse('["string"]');
 }