Skip to content

Instantly share code, notes, and snippets.

@ClosetGeek-Git
ClosetGeek-Git / zmqpoll.cc
Created July 19, 2023 16:25
Swoole reactor implementation using zmq_poll from libzmq for handling native ZMQSockets objects created via php-zmq along with Swoole network::Socket
#include "zmq.h"
#include "swoole.h"
#include "php_swoole_cxx.h"
#include "swoole_socket.h"
#include "swoole_reactor.h"
namespace swoole {
using network::Socket;
@ClosetGeek-Git
ClosetGeek-Git / fcgi_responder.php
Last active December 12, 2022 18:49
FastCGI Server / Responder over Swoole Unix domain socket
<?php
// based on Stone FastCGI https://github.com/StoneGroup/stone copyright MIT according to it's composer.json
class FastCGIConnection
{
private $server;
private $from_id;
private $fd;