PHP Chat room Open source system workerman-chat (2015-01-23 09:07:50)
reproduced
http://www.workerman.net/
Http://www.workerman.net/download/chat
Http://www.workerman.net/workerman-chat
Workerman is an open-source, high-performance PHP Socket server framework developed in PHP. Support TCP long connection, support WebSocket and many other protocols. It is widely used in mobile app, hand tour service, network game server, chat room 、...
Tags:php chat Room |
Category: PHP |
PHP Chat Room Framework
Workerman-chat is a distributed chat room framework based on WebSocket protocol developed with Workerman as a server container, using PHP.
The workerman-chat uses the gateway workers process model. Gateway is only responsible for network IO, full asynchronous non-blocking, each gateway process can accept tens of thousands of client connections. Workers uses a synchronization model that is familiar to PHP developers, and provides developers with basic interfaces Ongatewaymessage, OnMessage, OnClose, Sendtoclient, Sendtoall, and other methods. Developers simply add their own business logic to the Ongatewaymessage, OnMessage, OnClose three methods, and maintenance is simple.
With the gateway workers process model, the gateway and the workers are stateless, and the gateway and workers can be deployed on separate physical machines, so it's easy to expand and upgrade. Workerman-chat is also ideal for game background development.
To view the PHP chat demo, click here
Characteristics
- Using PHP Development
- PHP Multi-process
- Gateway Workers Process Model
- Supports Libevent event polling library, supports high concurrency
- Use WebSocket protocol by default, smaller bandwidth, better performance
- Supports distributed deployment with horizontal scaling
- Client Cross browser support (requires browser support HTML5 or Flash)
- Multi-room support
- Support Private Chat
- Supports heartbeat detection
- Also very suitable for game background development
Installation start
1, download Workerman-chat, and unzip to any directory
2, start Workerman ./workerman/bin/workermand start
such as
If you cannot start, check if the PHP extension is installed
command Line runyum install php-cli php-process git php-devel php-pear libevent-devel
3. Browser access port 55151, e.g. workerman.net:55151
Description
This chat room business logic is very simple, the business logic is in the file./applications/chat/event.php, developers can modify
Http://blog.sina.com.cn/s/blog_5fd841bf0102v9ab.html
PHP Chat room Open source system workerman-chat