Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrUnKnownProto 未知协议 ErrUnKnownProto = errors.New("unknown protocol") //ErrUnAuthorized 越权请求 ErrUnAuthorized = errors.New("unauthorized request") //ErrAccidentalRelease 意外的资源释放 ErrAccidentalRelease = errors.New("accidental release") //ErrHandshakeFailure 握手失败 ErrHandshakeFailure = errors.New("Handshake failure") )
Functions ¶
This section is empty.
Types ¶
type KCMiddleware ¶
type KCMiddleware interface {
Subscribe(*net.UDPConn, *net.UDPAddr, time.Duration) (interface{}, error)
}
KCMiddleware KCP 客户端中间件
type KSMiddleware ¶
type KSMiddleware interface { Exception Subscribe([]byte, *net.UDPConn, *net.UDPAddr) (interface{}, error) UnSubscribe(uint32) Update() }
KSMiddleware KCP 服务端中间件
type SnkMiddleCli ¶
type SnkMiddleCli struct {
// contains filtered or unexported fields
}
SnkMiddleCli snk资源订阅客户端
func SpawnSnkMiddleCli ¶
func SpawnSnkMiddleCli(p, g uint64) *SnkMiddleCli
SpawnSnkMiddleCli 创建Snk客户端中间件
type SnkMiddleServe ¶
type SnkMiddleServe struct {
// contains filtered or unexported fields
}
SnkMiddleServe 服务端
func SpawnSnkMiddleServe ¶
func SpawnSnkMiddleServe(seed int, p, g uint64, timeout time.Duration) *SnkMiddleServe
SpawnSnkMiddleServe 创建Snk服务端中间件
func (*SnkMiddleServe) UnSubscribe ¶
func (slf *SnkMiddleServe) UnSubscribe(d uint32)
UnSubscribe 取消一个订阅资源
Click to show internal directories.
Click to hide internal directories.