Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DialConn ¶
type DialConn struct {
// contains filtered or unexported fields
}
DialConn websocket拨号连接,支持(读/写)失败重连
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message websocket消息
func BinaryMessage ¶
func CloseMessage ¶
func NewMessage ¶
func PingMessage ¶
func PongMessage ¶
func TextMessage ¶
type UpgradeConn ¶
type UpgradeConn struct {
// contains filtered or unexported fields
}
UpgradeConn websocket协议连接
func Upgrade ¶
func Upgrade(w http.ResponseWriter, r *http.Request, authFn func(ctx context.Context, msg *Message) (*Message, error)) (*UpgradeConn, error)
Upgrade upgrades the HTTP server connection to the WebSocket protocol.
Click to show internal directories.
Click to hide internal directories.