lchb369 / Appnet
Licence: bsd-2-clause
A Network Server Extension For PHP
Stars: ✭ 72
Programming Languages
c
50402 projects - #5 most used programming language
Labels
Projects that are alternatives of or similar to Appnet
xm2cloud term
powerful webssh that developed with django, channels, xterm,ioloop
Stars: ✭ 17 (-76.39%)
Mutual labels: epoll
Chinadns Ng
chinadns next generation, refactoring with epoll and ipset
Stars: ✭ 407 (+465.28%)
Mutual labels: epoll
Gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go./ gnet 是一个高性能、轻量级、非阻塞的事件驱动 Go 网络框架。
Stars: ✭ 5,736 (+7866.67%)
Mutual labels: epoll
libevent
<Libevent深入浅出>本书要求有一定的服务并发编程基础,了解select和epoll等多路I/O复用机制。
Stars: ✭ 363 (+404.17%)
Mutual labels: epoll
Zeus
A high performance, cross-platform Internet Communication Engine. Developed with native socket API. Aim at handling millions of concurrent connections.
Stars: ✭ 30 (-58.33%)
Mutual labels: epoll
Handy
🔥简洁易用的C++11网络库 / 支持单机千万并发连接 / a simple C++11 network server framework
Stars: ✭ 3,815 (+5198.61%)
Mutual labels: epoll
Libfiber
The high performance coroutine library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iocp/windows GUI
Stars: ✭ 519 (+620.83%)
Mutual labels: epoll
Gaio
High performance async-io(proactor) networking for Golang。golangのための高性能非同期io(proactor)ネットワーキング
Stars: ✭ 272 (+277.78%)
Mutual labels: epoll
toyhttpd
I/O 模型练手代码,分别使用阻塞式 I/O、select、poll 和 epoll 和 Java NIO 实现了简单的 HTTP Server
Stars: ✭ 43 (-40.28%)
Mutual labels: epoll
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+6038.89%)
Mutual labels: epoll
Gev
🚀Gev is a lightweight, fast non-blocking TCP network library based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers.
Stars: ✭ 1,082 (+1402.78%)
Mutual labels: epoll
appnet是一个由C语言开发基于linux epoll的多线程+多进程的高性能异步网络库,可以同时支持TCP,HTTP和Websocket混合协议,目标是用php7+appnet快速构建高性能的长连接服务器。使其可广泛用于聊天系统,游戏服务器,消息通知服务器等实时通信场景。
##其特点有- 高性能,核心用纯C语言开发,epoll异步非阻塞事件通知机制,单线程可支撑10万并发连接
- 易用性,使用方式简单,并提供PHP7.0版本扩展,简单几步就可塔建一个功能齐全的长连接服务器,不再需要nginx,apache,php-fpm等。
- 高并发,多线程异步网络IO,Per Thread One Loop并发模型,多个worker进程并行处理业务。
- 多协议,可混合TCP协议,websocket协议和简单http协议与服务器通信。
- 内存优化,进程间通信使用共享内存,兼容jemalloc和tcmalloc内存优化技术。
- 缓冲区优化,采用redis的动态缓冲区,根据数据包大小自动扩充,有效避免内存浪费和缓冲区溢出,其内存预分配策略降低了内存分配次数。从而提高内存分配效率。
- 异步任务,耗时的任务可以投递到单独的任务进程异步处理,工作进程无需等待。
1,源码安装PHP7.0以上版本
2,下载扩展到任意目录appnet
3,执行如下指令:
>cd appnet
>/usr/local/php7/bin/phpize
>./configure --with-php-config=/usr/local/php7/bin/php-config
>make
>make install
启动服务器
>php example/server.php
TCP测试:
>telnet 127.0.0.1 3011
Http/Websocket测试:
webqq:http://www.appnet.site/webqq/index.html
双击QQ图标打开登录框,随便输入帐号进入
完整示例参见:https://github.com/lchb369/appnet_php7/blob/master/example/server.php
更多介绍参见:https://github.com/lchb369/appnet_php7/wiki/appnet%E4%BB%8B%E7%BB%8D
QQ交流群:379084776
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].