All Projects → blogdaren → Phpforker

blogdaren / Phpforker

A simple Multi-Process programming skeleton written in PHP and learned much from Workerman, which remove the part of Network Event Library. It aims at helping us study PHP Multi-Process programming & find out how Workerman core works.

Labels

Projects that are alternatives of or similar to Phpforker

Easychatandroidclient
EasyChat是一个开源的社交类的App。主要包含消息、好友、群组等相关的IM核心功能。部分界面参照了QQ、微信等相关社交APP。EasyChat APP整体采用MVVM模式,基于JetPack(Lifecycle,LiveData,ViewModel,Room)构建
Stars: ✭ 64 (-33.33%)
Mutual labels:  socket
Weixin
微信小游戏辅助合集(加减大师、包你懂我、大家来找茬腾讯版、头脑王者、好友画我、悦动音符、我最在行、星途WeGoing、猜画小歌、知乎答题王、腾讯中国象棋、跳一跳、题多多黄金版)
Stars: ✭ 1,216 (+1166.67%)
Mutual labels:  socket
Workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.3.
Stars: ✭ 9,617 (+9917.71%)
Mutual labels:  socket
Socket.io Rpc
Extend your promises across a network with socket.io
Stars: ✭ 67 (-30.21%)
Mutual labels:  socket
Netty Stroll
RPC基础通信框架
Stars: ✭ 77 (-19.79%)
Mutual labels:  socket
Jocket
Low-latency java socket implementation (using shared memory)
Stars: ✭ 83 (-13.54%)
Mutual labels:  socket
Tastysnake
A two-player (Bluetooth) game on Android.
Stars: ✭ 61 (-36.46%)
Mutual labels:  socket
Chat.io
A Real Time Chat Application built using Node.js, Express, Mongoose, Socket.io, Passport, & Redis.
Stars: ✭ 1,325 (+1280.21%)
Mutual labels:  socket
Bluesocket
Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.
Stars: ✭ 1,209 (+1159.38%)
Mutual labels:  socket
Advanced Php
最近打算写一些php一些偏微妙的教程,比如关于多进程、socket等相关,都是自己的一些感悟心得
Stars: ✭ 1,271 (+1223.96%)
Mutual labels:  socket
Socketcluster Server
Minimal server module for SocketCluster
Stars: ✭ 70 (-27.08%)
Mutual labels:  socket
Chatroom Vue
一个简单的多人聊天室。基于vue和node+Socket.IO
Stars: ✭ 71 (-26.04%)
Mutual labels:  socket
Fccss
Computer Science SCHOOL resources
Stars: ✭ 84 (-12.5%)
Mutual labels:  socket
Openssl examples
examples of using OpenSSL
Stars: ✭ 67 (-30.21%)
Mutual labels:  socket
Wslbridge2
Explore various ways to connect Windows Subsystem for Linux with Windows terminal emulators.
Stars: ✭ 93 (-3.12%)
Mutual labels:  socket
Pandatvdanmu
Panda TV 弹幕助手 ( 熊猫TV 弹幕助手) (JAVA)
Stars: ✭ 65 (-32.29%)
Mutual labels:  socket
Railschat
Real-time Rails-based Webchat for Instant Messaging (实时Web聊天室)
Stars: ✭ 81 (-15.62%)
Mutual labels:  socket
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (+1286.46%)
Mutual labels:  socket
Springboot im
使用springboot + nettysocketio开发的一个简易卡牌游戏。主要想了解游戏服务端开发流程,基本逻辑等相关知识和长连接。
Stars: ✭ 94 (-2.08%)
Mutual labels:  socket
Tcpraw
Sending packets through TCP
Stars: ✭ 86 (-10.42%)
Mutual labels:  socket

PHPForker

What is it

A simple Multi-Process programming skeleton written in PHP and learned much from Workerman, which remove the part of Network Event Library, it aims at two aspects by programming personally:

  • Help us study PHP Multi-Process programming
  • Help us find out how Workerman core works

PHPForker是什么

PHPForker是一个PHP多进程编程骨架,借鉴了Workerman诸多优良编程思想,剥离了其中的网络事件库抽象部分,集中围绕多进程编程,为了便于直观的调试以及保持最轻的多进程骨架,所以简单的内嵌了一个基于select多路复用技术的 TCP & UDP Server。为了学习如此优秀的Workerman框架,金牛座亲自撸了一遍,本项目旨在深入学习和分享:

  • 学习PHP多进程编程思想
  • 学习Workerman内核工作原理

Special Note

PHPForker is only an experimental work for study, so don't use it in a production environment unless you know what you're doing, it is better to use Workerman.

Installation

composer require blogdaren/phpforker

Prerequisites

  • >= PHP 5.3
  • A POSIX compatible operating system (Linux, OSX, BSD)
  • POSIX extensions for PHP
  • PCNTL extensions for PHP

Usage

<?php
//require_once dirname(__DIR__). '/Autoloader.php';
require_once __DIR__. '/vendor/autoload.php';

use PHPForker\Container;

//imitate...
$totalContainer = 2;
for($i = 1; $i <= $totalContainer; $i++)
{
    $name = "demo-" . $i;
    $socket_name = "tcp://0.0.0.0:2" . str_pad($i, 3, '0', STR_PAD_LEFT);
    $box = new Container($socket_name);
    $box->setPublicProps([
        'name' => $name,
        'count' => 2,
        'user' => 'root',
    ]);
}

Container::start();

Screenshot

demo1

demo2

demo3

demo4

demo6

demo5

Related links and thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].