Skip to content

Commit

Permalink
Merge pull request #533 from ehang-io/dev
Browse files Browse the repository at this point in the history
update docs
  • Loading branch information
ffdfgdfg authored May 9, 2020
2 parents e6b825d + 03e32ba commit f391813
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,7 @@ LevelInformational->6 LevelDebug->7

客户端与服务端间会间隔5s相互发送延迟测量包,这个时间间隔不可修改。
可修改延迟测量包丢包的次数,默认为60也就是5分钟都收不到一个延迟测量回包,则会断开客户端连接。
值得注意的是需要客户端的socket关闭,才会进行重连,也就是当客户端无法收到服务端的fin包时,只有客户端自行关闭socket才行。
也就是假如服务端设置为较低值,而客户端设置较高值,而此时服务端断开连接而客户端无法收到服务端的fin包,客户端也会继续等着直到触发客户端的超时设置。

`nps.conf``npc.conf`中设置`disconnect_timeout`即可,客户端还可附带`-disconnect_timeout=60`参数启动
1 change: 1 addition & 0 deletions docs/server_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ p2p_ip| 服务端Ip,使用p2p模式必填
p2p_port|p2p模式开启的udp端口
pprof_ip|debug pprof 服务端ip
pprof_port|debug pprof 端口
disconnect_timeout|客户端连接超时,单位 5s,默认值 60,即 300s = 5mins

0 comments on commit f391813

Please sign in to comment.