承接 williameggers/reactphp-rlogin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

williameggers/reactphp-rlogin

最新稳定版本:1.0.2

Composer 安装命令:

composer require williameggers/reactphp-rlogin

包简介

An rlogin client for ReactPHP

README 文档

README

CI status Latest Stable Version Latest Unstable Version License

An asynchronous RLogin client for PHP, built on ReactPHP. Supports client escape sequences, terminal window resizing, and full event-driven interaction.

Installation

Install via Composer:

composer require williameggers/reactphp-rlogin

Usage example

use WilliamEggers\React\RLogin\RLogin;

// All of these options are required
$client = new RLogin([
    'host' => 'rlogin.example.com',
    'port' => 513,
    'clientUsername' => 'localuser',
    'serverUsername' => 'remoteuser',
    'terminalType' => 'vt100',
    'terminalSpeed' => 9600,
]);

// Now that the events will be handled properly, we can connect ...
$client->connect()->then(function (Connection $connection) {
    // If data has been received from the server ...
    $connection->on('data', function ($data) {
        echo "Received: $data";
    });

    // If there was an error ...
    $connection->on('error', function (\Throwable $error) {
        echo 'Error: ' . $error->getMessage() . "\n";
    });

    // If we've been disconnected ...
    $connection->on('close', function () {
        echo "Closed\n";
    });
});

Contributions

Contributions are welcome and encouraged!

To contribute:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Submit a pull request with a clear description of what you've done and why.

Please try to follow existing coding style and conventions, and include tests if applicable. Feel free to open an issue if you'd like to discuss a potential change or need guidance on where to start.

License

BSD 2-Clause License

Copyright (c) 2025, William Eggers

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2025-08-16