定制 datto/json-rpc-ssh 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

datto/json-rpc-ssh

最新稳定版本:1.0.0

Composer 安装命令:

composer require datto/json-rpc-ssh

包简介

SSH client and server for JSON-RPC 2.0

README 文档

README

Features

  • Fully compliant with the JSON-RPC 2.0 specifications (with 100% unit-test coverage)
  • Flexible: you can choose your own system for interpreting the JSON-RPC method strings
  • Minimalistic (just two tiny files)
  • Ready to use, with working examples

Requirements

  • PHP >= 5.3

License

This package is released under an open-source license: LGPL-3.0

Examples

Client

$client = new Client($destination, $command, $options);

$client->query(1, 'add', array(1, 2));

$reply = $client->send(); // array('jsonrpc' => '2.0', 'id' => 1, 'result' => 3)

Server

$translator = new Translator();

$server = new Server($translator);

$server->reply();

See the "examples" folder for ready-to-use examples.

Installation

If you're using Composer, you can use this package (datto/json-rpc-ssh) by inserting a line into the "require" section of your "composer.json" file:

        "datto/json-rpc-ssh": "~1.0"

Getting started

  1. Try the examples! Follow the README file in the "examples" directory to set up an SSH environment. Then run the examples from the project directory like this:

    php examples/client.php
    
  2. Once your example is working, replace the example "Server" code with your own code.

  3. Write a beautiful wrapper around the JSON-RPC client class that will dovetail with your project.

Author

Spencer Mortensen

统计信息

  • 总下载量: 708
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2015-05-22