kmgTfo

package
v0.0.0-...-05317bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TfoDial

func TfoDial(nextAddr string, data []byte) (conn net.Conn, err error)

dial tcp with tcp fastopen 第一个包体积不要太大,需要小于一定数量,否则会被吃掉(正确性问题), 如果过大,此处会在连接时发送前一部分,连接后又发送一部分

func TfoLazyDial

func TfoLazyDial(network string, nextAddr string) (conn net.Conn, err error)

dial tcp with tcp fastopen you should use

  echo 3 > /proc/sys/net/ipv4/tcp_fastopen
to enable it

you should use linux kernel version >3.7 you should write something before read to use this function. network is useless, it always use tcp4

func TfoListen

func TfoListen(network string, listenAddr string) (listener net.Listener, err error)

network is useless ,it will always use tcp4

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL