tcp

package module
v0.0.0-...-c1e5b24 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts ...ClientOption) network.Client

func NewServer

func NewServer(opts ...ServerOption) network.Server

Types

type ClientOption

type ClientOption func(o *clientOptions)

func WithClientDialAddr

func WithClientDialAddr(addr string) ClientOption

WithClientDialAddr 设置拨号地址

func WithClientHeartbeatInterval

func WithClientHeartbeatInterval(heartbeatInterval time.Duration) ClientOption

WithClientHeartbeatInterval 设置心跳间隔时间

type ServerOption

type ServerOption func(o *serverOptions)

func WithServerHeartbeatInterval

func WithServerHeartbeatInterval(heartbeatInterval time.Duration) ServerOption

WithServerHeartbeatInterval 设置心跳检测间隔时间

func WithServerListenAddr

func WithServerListenAddr(addr string) ServerOption

WithServerListenAddr 设置监听地址

func WithServerMaxConnNum

func WithServerMaxConnNum(maxConnNum int) ServerOption

WithServerMaxConnNum 设置连接的最大连接数

Jump to

Keyboard shortcuts

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