PHPackages                             starship/reactmongrel2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. starship/reactmongrel2

ActiveLibrary[HTTP &amp; Networking](/categories/http)

starship/reactmongrel2
======================

Mongrel2 bindings for Reactphp.

v0.1.2(13y ago)6632MITPHPPHP &gt;=5.3.2

Since Dec 21Pushed 13y ago2 watchersCompare

[ Source](https://github.com/evan108108/React-Mongrel2)[ Packagist](https://packagist.org/packages/starship/reactmongrel2)[ RSS](/packages/starship-reactmongrel2/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Starship/ReactMongrel2
======================

[](#starshipreactmongrel2)

Mongrel2 bindings for [ReactPHP](http://reactphp.org). Provides a simple rapper for easy connection to Mongrel2 web-server.

Install
-------

[](#install)

The recommended way to install react/mongrel2 is [through composer](http://getcomposer.org).

```
{
    "require": {
        "starship/reactmongrel2": "dev-master"
    }
}
```

Example
-------

[](#example)

Hello World; Connecting a React process to Mongrel2:

### helloMongrel2.php

[](#hellomongrel2php)

```
require __DIR__.'/vendor/autoload.php';

$loop = React\EventLoop\Factory::create(); //Create The React Loop

	//Mongrel2 Setup ------------------------------------------
	//---------------------------------------------------------
	$m2 = new Starship\ReactMongrel2\Connect(
		'82209006-86FF-4982-B5EA-D1E29E55D481', //Sender ID
		'tcp://127.0.0.1:9997', //recv_spec
		'tcp://127.0.0.1:9996', //send_spec
		$loop //React Event LoopInterface
	);
	//---------------------------------------------------------
	//---------------------------------------------------------

	//Handel incoming and outgoing requests -------------------
	//---------------------------------------------------------
	$m2->on('read.message', function ($msg) use ($m2) {
		echo $msg . "\n\n";
		$m2->send($msg, 'Hello From React PHP');
	});
	//---------------------------------------------------------
	//---------------------------------------------------------

	//Handle comm errors --------------------------------------
	//---------------------------------------------------------
	$m2->on('read.error', function ($e) {
			var_dump($e->getMessage());
	});

	$m2->on('write.error', function ($e) {
			var_dump($e->getMessage());
	});
	//---------------------------------------------------------
	//---------------------------------------------------------

$loop->run(); //Start the loop
```

### mongrel2.conf

[](#mongrel2conf)

```
hello_handler = Handler(
    send_spec='tcp://*:9997',
    send_ident='ab206881-6f49-4276-9db1-1676bfae18b0',
    recv_spec='tcp://*:9996', recv_ident=''
)

main = Server(
    uuid="9e71cabf-6afb-4ee1-b550-7972245f7e0a",
    access_log="/logs/access.log",
    error_log="/logs/error.log",
    chroot="./",
    default_host="localhost",
    name="codebanger",
    pid_file="/run/mongre2.pid",
    port=6767,
    hosts = [
        Host(name="localhost", routes={'/hello':hello_handler})
    ]
)

servers = [main]
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4896d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/801e92d75e08f2a39f32c6c3b40cd8f6e71c0ddc145812bb389b0359dc832be8?d=identicon)[evan108108](/maintainers/evan108108)

---

Top Contributors

[![evan108108](https://avatars.githubusercontent.com/u/197995?v=4)](https://github.com/evan108108 "evan108108 (6 commits)")[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (1 commits)")

---

Tags

mongrel2mongrel

### Embed Badge

![Health badge](/badges/starship-reactmongrel2/health.svg)

```
[![Health](https://phpackages.com/badges/starship-reactmongrel2/health.svg)](https://phpackages.com/packages/starship-reactmongrel2)
```

###  Alternatives

[cboden/ratchet

PHP WebSocket library

6.4k21.4M239](/packages/cboden-ratchet)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[ratchet/pawl

Asynchronous WebSocket client

6148.9M214](/packages/ratchet-pawl)[gos/web-socket-bundle

Symfony Web Socket Bundle

6202.2M8](/packages/gos-web-socket-bundle)[binsoul/net-mqtt-client-react

Asynchronous MQTT client built on React

48787.8k24](/packages/binsoul-net-mqtt-client-react)[valga/fbns-react

A PHP client for the FBNS built on top of ReactPHP

15751.3k19](/packages/valga-fbns-react)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
