2017 © Pedro Peláez
 

library x-swoole-rpc

Rpc library for swoole

image

limingxinleo/x-swoole-rpc

Rpc library for swoole

  • Saturday, June 23, 2018
  • by limingxinleo
  • Repository
  • 2 Watchers
  • 8 Stars
  • 1,816 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 54 % Grown

The README.md

Swoole RPC Library

Build Status, (*1)

Go版本, (*2)

安装

composer require limingxinleo/x-swoole-rpc

使用

服务端示例代码, (*3)

<?php
require __DIR__ . '/../vendor/autoload.php';

use Xin\Swoole\Rpc\Server;

use Xin\Swoole\Rpc\Handler\Handler;

class TestHandler extends Handler
{
    public function test()
    {
        return 'success';
    }
}

$server = new Server();
$server->setHandler('test', TestHandler::class)->serve('0.0.0.0', '11520', [
    'pid_file' => './socket.pid',
    'daemonize' => false,
    'max_request' => 500, // 每个worker进程最大处理请求次数
    'open_eof_check' => true,
    'package_eof' => "\r\n",
]);

客户端示例代码, (*4)

<?php

use Xin\Swoole\Rpc\Client\Client;

/**
 * Class TestClient
 * @method test
 */
class TestClient extends Client
{
    protected $service = 'test';

    protected $host = '127.0.0.1';

    protected $port = 11520;
}

$result = TestClient::getInstance()->test();

The Versions

23/06 2018

dev-master

9999999-dev

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

24/05 2018

1.2.1

1.2.1.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

19/05 2018

1.2.0

1.2.0.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

11/04 2018

1.1.2

1.1.2.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

11/04 2018

1.1.1

1.1.1.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

11/04 2018

1.1.0

1.1.0.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

20/03 2018

1.0.6

1.0.6.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

10/03 2018

1.0.5

1.0.5.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

02/03 2018

1.0.0

1.0.0.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

02/01 2018

0.1.2

0.1.2.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕

02/01 2018

0.1.1

0.1.1.0

Rpc library for swoole

  Sources   Download

MIT

The Requires

 

The Development Requires

by 李铭昕