定制 sharkydog/http 二次开发

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

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

sharkydog/http

最新稳定版本:v1.3.5

Composer 安装命令:

composer require sharkydog/http

包简介

HTTP/Websocket server and client

README 文档

README

A small HTTP server and client with websockets, intended for services in a local network, based on ReactPHP and a fork of ratchet/rfc6455.

⚠️ Do NOT expose this to the Wild Wild Web!!!

It is NOT and probably never will be secure enough.

A simple DoS attack will bring it down, maybe the host machine too.

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.

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.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-12