A small HTTP server and client with websockets, intended for services in a local network, based on ReactPHP and a fork of ratchet/rfc6455.
Some level of protection may be created through filters. A "contrack" filter is in "an idea" stage, to provide facility for other filters and handlers to track connections, set timeouts and such.
Documentation is not yet written, there is a lot to write and will land in the Wiki eventually.
Until then, there is a quick start example for the server.
- new (13.10.24): server-handlers and promise
- new (16.10.24): streams
- new (17.10.24): filters
- new (18.10.24): access control
- new (20.10.24): client
- new (22.10.24): websocket server, client
Examples should be looked in the main
branch, tagged releases may not have them up to date - main/examples.
And there is always the option to go for a treasure hunt through the source. And I will be happy to answer questions and provide assistance.
In short, some key features:
- HTTP/1.1, Keep-Alive, Chunked transfer encoding
- simple routes - error code, text response, callback, static files or custom handler
- Streams for request and response bodies
- Multipart stream and parser
- Byte range stream
- Promised response
- Connection, request, response filters
- Access control, based on routes, IPv4 address/cidr and basic authorization
- Websocket protocol handler (server)
- HTTP client
- Websocket client
Most of these however are not enabled by default and will need to be "used" in handlers. See examples.