Compare commits

...
2 Commits
Author SHA1 Message Date
xtaci adae725995 toggle writing method to nodelay for responsivness 2018-09-22 21:07:08 +08:00
xtaciandGitHub c59479c7c4 Update README.md 2018-09-20 19:16:27 +08:00
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -31,6 +31,13 @@ Increase the number of open files on your server, as:
`ulimit -n 65535`, or write it in `~/.bashrc`.
Increase the OS UDP buffers to improve performance, as:
```
net.core.rmem_max=26214400
net.core.rmem_default=26214400
```
Download a corresponding precompiled [Releases](https://github.com/xtaci/kcptun/releases).
```
+1 -1
View File
@@ -358,7 +358,7 @@ func main() {
return nil, errors.Wrap(err, "createConn()")
}
kcpconn.SetStreamMode(true)
kcpconn.SetWriteDelay(true)
kcpconn.SetWriteDelay(false)
kcpconn.SetNoDelay(config.NoDelay, config.Interval, config.Resend, config.NoCongestion)
kcpconn.SetWindowSize(config.SndWnd, config.RcvWnd)
kcpconn.SetMtu(config.MTU)
+1 -1
View File
@@ -375,7 +375,7 @@ func main() {
if conn, err := lis.AcceptKCP(); err == nil {
log.Println("remote address:", conn.RemoteAddr())
conn.SetStreamMode(true)
conn.SetWriteDelay(true)
conn.SetWriteDelay(false)
conn.SetNoDelay(config.NoDelay, config.Interval, config.Resend, config.NoCongestion)
conn.SetMtu(config.MTU)
conn.SetWindowSize(config.SndWnd, config.RcvWnd)