Skip to content

Commit

Permalink
fix link author
Browse files Browse the repository at this point in the history
  • Loading branch information
starsea committed Nov 4, 2014
1 parent 5ece9b3 commit 1c304cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 01-环境搭建及扩展安装.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ $server = new Server();
2. 调用**set**函数设置swoole_server的相关配置选项
3. 调用**on**函数设置相关回调函数
关于set配置选项以及on回调函数的具体说明,请参考我整理的swoole文档(
[配置选项](https://github.com/starsea/swoole-doc/blob/master/doc/01.swoole_server%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9.md))
[配置选项](https://github.com/LinkedDestiny/swoole-doc/blob/master/doc/01.swoole_server%E9%85%8D%E7%BD%AE%E9%80%89%E9%A1%B9.md))

这里只给出简单介绍。onStart回调在server运行前被调用,onConnect在有新客户端连接过来时被调用,onReceive函数在有数据发送到server时被调用,onClose在有客户端断开连接时被调用。
这里就可以大概看出如何使用swoole:在onConnect处监听新的连接;在onReceive处接收数据并处理,然后可以调用send函数将处理结果发送出去;在onClose处处理客户端下线的事件。
Expand Down

0 comments on commit 1c304cc

Please sign in to comment.