定制 pbergman/fifo 二次开发

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

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

pbergman/fifo

最新稳定版本:1.0.4

Composer 安装命令:

composer require pbergman/fifo

包简介

a php posix fifo (named pipes) wrapper to use for ipc

README 文档

README

FIFO (named pipes)

A simple wrapper around posix_mkfifo that can send signals and mixed data for ipc. Difference between signals and data is that data will verified and signal only will return the header (with pid and type) and the signal and is basically a stripped version of data to send integers.

###usage:

$object = new \stdClass();
$object->foo = 'bar';
$object->bar = 'foo';

$transport = new \PBergman\FIFO\Transport(posix_getpid());
$transport->write($object);
$transport->signal(SIGINT);

var_dump($transport->read()) // Will return $object;
var_dump($transport->read()) // Will return SIGINT;
var_dump($transport->read()) // Will return false;

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-09