Documentation
¶
Index ¶
- type Conn
- type WebSocket
- func (w *WebSocket) Close() error
- func (w *WebSocket) LocalAddr() net.Addr
- func (w *WebSocket) ReadMessage() (p []byte, err error)
- func (w *WebSocket) RemoteAddr() net.Addr
- func (w *WebSocket) SetReadDeadline(t time.Time) error
- func (w *WebSocket) SetReadLimit(limit int64)
- func (w *WebSocket) SetWriteDeadline(t time.Time) error
- func (w *WebSocket) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn interface { // SetWriteDeadline 写入超时 SetWriteDeadline(t time.Time) error // SetReadDeadline 读取超时 SetReadDeadline(t time.Time) error // SetReadLimit 读取限制 SetReadLimit(limit int64) // LocalAddr 本地地址 LocalAddr() net.Addr // RemoteAddr 远程地址 RemoteAddr() net.Addr // ReadMessage 读取消息 ReadMessage() (p []byte, err error) io.Writer io.Closer }
Conn 连接
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
WebSocket webSocket连接
func NewWebSocket ¶
NewWebSocket 创建WebSocket
func (*WebSocket) ReadMessage ¶
ReadMessage 读取消息
func (*WebSocket) SetReadDeadline ¶
SetReadDeadline 设置读取超时时间
func (*WebSocket) SetWriteDeadline ¶
SetWriteDeadline 设置写入超时时间
Click to show internal directories.
Click to hide internal directories.