本文整理汇总了PHP中thrift_protocol_write_binary函数的典型用法代码示例。如果您正苦于以下问题:PHP thrift_protocol_write_binary函数的具体用法?PHP thrift_protocol_write_binary怎么用?PHP thrift_protocol_write_binary使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了thrift_protocol_write_binary函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: send_Log
public function send_Log($messages)
{
$args = new scribe_Log_args();
$args->messages = $messages;
$bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
if ($bin_accel) {
thrift_protocol_write_binary($this->output_, 'Log', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
} else {
$this->output_->writeMessageBegin('Log', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
开发者ID:utcuong3010,项目名称:vng,代码行数:14,代码来源:scribe.php
示例17: send_Log
public function send_Log(array $messages)
{
$args = new \scribe\thrift\scribe_Log_args();
$args->messages = $messages;
$bin_accel = $this->output_ instanceof TBinaryProtocolAccelerated && function_exists('thrift_protocol_write_binary');
if ($bin_accel) {
thrift_protocol_write_binary($this->output_, 'Log', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
} else {
$this->output_->writeMessageBegin('Log', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
开发者ID:ngtbtrang,项目名称:scribelog_phpextension,代码行数:14,代码来源:scribe.php
示例18: send_hql_query
public function send_hql_query($command)
{
$args = new Hypertable_ThriftGen_HqlService_hql_query_args();
$args->command = $command;
$bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
if ($bin_accel) {
thrift_protocol_write_binary($this->output_, 'hql_query', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
} else {
$this->output_->writeMessageBegin('hql_query', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
开发者ID:ualtinok,项目名称:hypertable,代码行数:14,代码来源:HqlService.php
示例19: send_healthPoke
public function send_healthPoke(\RedRoma\Aroma\Endpoint\HealthPokeRequest $request)
{
$args = new \RedRoma\Aroma\Endpoint\ApplicationEndpoint_healthPoke_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_, 'healthPoke', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
} else {
$this->output_->writeMessageBegin('healthPoke', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
开发者ID:RedRoma,项目名称:aroma-thrift,代码行数:14,代码来源:ApplicationEndpoint.php
示例20: send_addMultiLog
public function send_addMultiLog($logs)
{
$args = new logcommentfilter_LogCommentFilterWriteService_addMultiLog_args();
$args->logs = $logs;
$bin_accel = $this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED && function_exists('thrift_protocol_write_binary');
if ($bin_accel) {
thrift_protocol_write_binary($this->output_, 'addMultiLog', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
} else {
$this->output_->writeMessageBegin('addMultiLog', TMessageType::CALL, $this->seqid_);
$args->write($this->output_);
$this->output_->writeMessageEnd();
$this->output_->getTransport()->flush();
}
}
开发者ID:utcuong3010,项目名称:vng,代码行数:14,代码来源:LogCommentFilterWriteService.php
注:本文中的thrift_protocol_write_binary函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论