You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
438 B
Go
15 lines
438 B
Go
1 year ago
|
package config
|
||
|
|
||
|
type (
|
||
|
WSEvent struct {
|
||
|
// 连接成功回调
|
||
|
OnConnected func()
|
||
|
// 连接异常回调,在准备进行连接的过程中发生异常时触发
|
||
|
OnConnectError func(err error)
|
||
|
// 连接断开回调,网络异常,服务端掉线等情况时触发
|
||
|
OnDisconnected func(err error)
|
||
|
// 连接关闭回调,服务端发起关闭信号或客户端主动关闭时触发
|
||
|
OnClose func(code int, text string)
|
||
|
}
|
||
|
)
|