package
0.2.0
Repository: https://github.com/finishy1995/go-library.git
Documentation: pkg.go.dev

# Functions

GenerateID 返回一个随机生成的 64 字节 ID。这个函数进程安全 这个方法大概花费 13.29 ns, 不产出任何内存垃圾.
VerifyAddress 验证地址是否正确.
WithClientContext 特定参数配置.
WithMaxConnNum 最大连接数配置.
WithReconnect 重连配置.
WithServerContext 特定参数配置.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DefaultClientOptions 默认 Client 选项.
DefaultServerOptions 默认 Server 选项.
ErrInvalidAddress 不合法的地址输入.
ErrInvalidAgent 不合法的 Agent.
ErrInvalidCodec 不合法的 Codec.
ErrInvalidGetAgentFunc 不合法的新建 agent 函数.
ErrPacketSplit 网络包传输不完全.
ErrTooLessLength 写入缓冲长度太低.
ErrTooMoreLength 写入缓冲长度太高.

# Structs

ClientOptions 配置结构体.
ServerOptions 服务器配置结构体.

# Interfaces

Agent 网络代理.
Client 网络客户端.
Codec 网络连接的 Codec。 Codec 可以理解为协议,例:websocket 是 tcp 的一种 codec;如果你需要 websocket,那你只需要用 tcp 的网络库 + websocket codec.
CodecConn 支持 Codec 的网络连接.
Conn 网络连接.
Object 持续存在的对象,需要注意生命周期管理.
Server 网络服务器.

# Type aliases

ClientOption 客户端配置项.
GetAgent 获取代理.
ID 标准数字唯一键.
ServerOption 服务器配置项.