當前位置: 首頁>>代碼示例>>PHP>>正文


PHP thrift_protocol_write_binary函數代碼示例

本文整理匯總了PHP中thrift_protocol_write_binary函數的典型用法代碼示例。如果您正苦於以下問題:PHP thrift_protocol_write_binary函數的具體用法?PHP thrift_protocol_write_binary怎麽用?PHP thrift_protocol_write_binary使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了thrift_protocol_write_binary函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test

function test()
{
    $p = new DummyProtocol();
    $v1 = new TestStruct();
    $v1->aString = str_repeat('x', 1000000);
    thrift_protocol_write_binary($p, 'foomethod', 1, $v1, 20, true);
    $p->getTransport()->buff = str_replace(pack('N', 1000000), pack('N', (1 << 32) - 2), $p->getTransport()->buff);
    thrift_protocol_read_binary($p, 'TestStruct', true);
}
開發者ID:badlamer,項目名稱:hhvm,代碼行數:9,代碼來源:thrift.php

示例2: serialize

 public static function serialize($object)
 {
     $transport = new TMemoryBuffer();
     $protocol = new TBinaryProtocolAccelerated($transport);
     if (function_exists('thrift_protocol_write_binary')) {
         thrift_protocol_write_binary($protocol, $object->getName(), TMessageType::REPLY, $object, 0, $protocol->isStrictWrite());
         $protocol->readMessageBegin($unused_name, $unused_type, $unused_seqid);
     } else {
         $object->write($protocol);
     }
     return $transport->getBuffer();
 }
開發者ID:jemmy655,項目名稱:cassandraci,代碼行數:12,代碼來源:TBinarySerializer.php

示例3: send_close

 public function send_close()
 {
     $args = new \ICANS\Component\IcansLoggingComponent\Flume\ThriftFlumeEventServer_close_args();
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'close', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('close', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:xietongling,項目名稱:IcansLoggingComponent,代碼行數:13,代碼來源:ThriftFlumeEventServerClient.php

示例4: serialize

 public static function serialize($object, $disable_hphp_extension = false)
 {
     $transport = new TMemoryBuffer();
     $protocol = new TBinaryProtocolAccelerated($transport);
     if (\hacklib_cast_as_boolean(function_exists('thrift_protocol_write_binary')) && !\hacklib_cast_as_boolean($disable_hphp_extension)) {
         thrift_protocol_write_binary($protocol, $object->getName(), TMessageType::REPLY, $object, 0, $protocol->isStrictWrite());
         $unused_name = $unused_type = $unused_seqid = null;
         $protocol->readMessageBegin($unused_name, $unused_type, $unused_seqid);
     } else {
         $object->write($protocol);
     }
     return $transport->getBuffer();
 }
開發者ID:pandasasa,項目名稱:fbthrift,代碼行數:13,代碼來源:TBinarySerializer.php

示例5: send_gen_id

 public function send_gen_id()
 {
     $args = new generator_service_gen_id_args();
     $bin_accel = $this->output_ instanceof Thrift\Protocol\TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'gen_id', Thrift\Type\TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('gen_id', Thrift\Type\TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:xiaoyueer98,項目名稱:store.heimi.com,代碼行數:13,代碼來源:generator_service.php

示例6: send_GetPeerStatus

 public function send_GetPeerStatus()
 {
     $args = new ambition_ISearchService_GetPeerStatus_args();
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'GetPeerStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('GetPeerStatus', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:wheatma,項目名稱:react_study,代碼行數:13,代碼來源:ISearchService.php

示例7: send_getApiVersion

 public function send_getApiVersion()
 {
     $args = new \RedRoma\Aroma\MessageService\MessageService_getApiVersion_args();
     $bin_accel = $this->output_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'getApiVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('getApiVersion', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:RedRoma,項目名稱:aroma-thrift,代碼行數:13,代碼來源:MessageService.php

示例8: send_getToken

 public function send_getToken($userID)
 {
     $args = new vng_zingme_payment_thrift_TToken_getToken_args();
     $args->userID = $userID;
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'getToken', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('getToken', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:utcuong3010,項目名稱:vng,代碼行數:14,代碼來源:TToken.php

示例9: send_getdata

 public function send_getdata($arg)
 {
     $args = new TestT_getdata_args();
     $args->arg = $arg;
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'getdata', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('getdata', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:lixiaohong0212,項目名稱:github_code,代碼行數:14,代碼來源:TestTClient.php

示例10: send_batchHttpReq

 public function send_batchHttpReq($request)
 {
     $args = new BatchRpcService_batchHttpReq_args();
     $args->request = $request;
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'batchHttpReq', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('batchHttpReq', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:WickyLeo,項目名稱:bobcat,代碼行數:14,代碼來源:BatchRpcService.php

示例11: send_Search

 public function send_Search(\SearchThrift\SearchRequest $Request)
 {
     $args = new \SearchThrift\SearchService_Search_args();
     $args->Request = $Request;
     $bin_accel = $this->output_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'Search', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('Search', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:imbzd,項目名稱:sessdw,代碼行數:14,代碼來源:SearchService.php

示例12: send_UpdateState

 public function send_UpdateState(\TUpdateStateRequest $request)
 {
     $args = new \StateStoreSubscriberService_UpdateState_args();
     $args->request = $request;
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'UpdateState', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('UpdateState', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:pozypakya,項目名稱:php_impala_phar,代碼行數:14,代碼來源:StateStoreSubscriberService.php

示例13: send_Send

 public function send_Send(\Impala\Test\ThriftDataParams $params)
 {
     $args = new \Impala\Test\NetworkTestService_Send_args();
     $args->params = $params;
     $bin_accel = $this->output_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'Send', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('Send', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:pozypakya,項目名稱:php-impala,代碼行數:14,代碼來源:NetworkTestService.php

示例14: send_UpdateState

 public function send_UpdateState(\Impala\TUpdateStateRequest $params)
 {
     $args = new \Impala\StateStoreSubscriber_UpdateState_args();
     $args->params = $params;
     $bin_accel = $this->output_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'UpdateState', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('UpdateState', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:pozypakya,項目名稱:php-impala,代碼行數:14,代碼來源:StateStoreSubscriber.php

示例15: send_retrieve

 public function send_retrieve($uid)
 {
     $args = new example_UserStorage_retrieve_args();
     $args->uid = $uid;
     $bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
     if ($bin_accel) {
         thrift_protocol_write_binary($this->output_, 'retrieve', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
     } else {
         $this->output_->writeMessageBegin('retrieve', TMessageType::CALL, $this->seqid_);
         $args->write($this->output_);
         $this->output_->writeMessageEnd();
         $this->output_->getTransport()->flush();
     }
 }
開發者ID:bzanchet,項目名稱:presentation-thrift-fisl10,代碼行數:14,代碼來源:UserStorage.php


注:本文中的thrift_protocol_write_binary函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。