承接 expressif/http 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

expressif/http

最新稳定版本:0.0.1-rc3

Composer 安装命令:

composer require expressif/http

包简介

http implementation with expressif streams

README 文档

README

Contains http bindings between pecl_http and libevent for creating a fast web server.

Requirements

This library use expressif/stream and http module :

  • PHP 5.6+
  • libevent
  • pecl_http

If you are on windows (for dev & test purpose) you can dirrectly install pre-built libraries.

NOTE : if you plan to use this library on a multi-core server, you should consider expressif/cluster

usage

<?php

  require 'vendor/autoload.php';
  use Expressif\Http\Server;

  $endpoint = '127.0.0.1:1337';
  echo "Serving HTTP at http://$endpoint\n";

  $http = new Server('tcp://' . $endpoint);

  $http->on('request', function($req, $res) {
    $res->writeHead(200, ['Content-Type' => 'text/plain']);
    $res->end('Hello world');
  });

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-25