create() public static method

public static create ( $uriList, $async = true )
示例#1
0
<?php

require_once "../../../vendor/autoload.php";
require_once '../CompressFilter.php';
require_once '../SizeFilter.php';
require_once '../StatFilter.php';
use Hprose\Client;
$client = Client::create('tcp://127.0.0.1:1143/', false);
$client->addFilter(new StatFilter());
$client->addFilter(new SizeFilter('Non compressed'));
$client->addFilter(new CompressFilter());
$client->addFilter(new SizeFilter('Compressed'));
$client->addFilter(new StatFilter());
$value = range(0, 99999);
var_dump(count($client->echo($value)));
示例#2
0
<?php

require_once "../../vendor/autoload.php";
use Hprose\Client;
use Hprose\InvokeSettings;
use Hprose\ResultMode;
$client = Client::create('http://hprose.com/example/', false);
var_dump($client->hello("World", new InvokeSettings(array('mode' => ResultMode::Normal))));
var_dump($client->hello("World", new InvokeSettings(array('mode' => ResultMode::Serialized))));
var_dump($client->hello("World", new InvokeSettings(array('mode' => ResultMode::Raw))));
var_dump($client->hello("World", new InvokeSettings(array('mode' => ResultMode::RawWithEndTag))));