Documentation ¶
Overview ¶
TCP服务端
Index ¶
- func Checksum(buffer []byte) uint32
- func Conn(ip string, port int, timeout ...int) (net.Conn, error)
- func Receive(conn net.Conn, retry ...Retry) ([]byte, error)
- func ReceiveWithTimeout(conn net.Conn, timeout time.Duration, retry ...Retry) ([]byte, error)
- func Send(conn net.Conn, data []byte, retry ...Retry) error
- func SendReceive(conn net.Conn, data []byte, retry ...Retry) ([]byte, error)
- func SendReceiveWithTimeout(conn net.Conn, data []byte, timeout time.Duration, retry ...Retry) ([]byte, error)
- func SendWithTimeout(conn net.Conn, data []byte, timeout time.Duration, retry ...Retry) error
- type Retry
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReceiveWithTimeout ¶
带超时时间的数据获取
func SendReceive ¶
发送数据并等待接收返回数据
Types ¶
Click to show internal directories.
Click to hide internal directories.