Documentation ¶
Overview ¶
golang.org/x/net v0.14.0
Index ¶
- Constants
- Variables
- func Client(conn net.Conn, cfg *tls.Config) net.Conn
- func Server(conn net.Conn, cfg *tls.Config) net.Conn
- type WebsocketConn
- func (wc *WebsocketConn) Close() (err error)
- func (wc *WebsocketConn) HandShakeHandle() error
- func (wc *WebsocketConn) LocalAddr() net.Addr
- func (wc *WebsocketConn) Read(b []byte) (n int, err error)
- func (wc *WebsocketConn) RemoteAddr() net.Addr
- func (wc *WebsocketConn) SetDeadline(t time.Time) error
- func (wc *WebsocketConn) SetReadDeadline(t time.Time) error
- func (wc *WebsocketConn) SetWriteDeadline(t time.Time) error
- func (wc *WebsocketConn) Write(b []byte) (n int, err error)
Constants ¶
View Source
const ( ProtocolVersionHybi13 = 13 ProtocolVersionHybi = ProtocolVersionHybi13 SupportedProtocolVersion = "13" ContinuationFrame = 0 TextFrame = 1 BinaryFrame = 2 CloseFrame = 8 PingFrame = 9 PongFrame = 10 UnknownFrame = 255 DefaultMaxPayloadBytes = 32 << 20 // 32MB )
Variables ¶
View Source
var ( ErrBadProtocolVersion = errors.New("bad protocol version") ErrBadScheme = errors.New("bad scheme") ErrBadStatus = errors.New("bad status") ErrBadUpgrade = errors.New("missing or bad upgrade") ErrBadWebSocketOrigin = errors.New("missing or bad WebSocket-Origin") ErrBadWebSocketLocation = errors.New("missing or bad WebSocket-Location") ErrBadWebSocketProtocol = errors.New("missing or bad WebSocket-Protocol") ErrBadWebSocketVersion = errors.New("missing or bad WebSocket Version") ErrChallengeResponse = errors.New("mismatch challenge/response") ErrBadFrame = errors.New("bad frame") ErrBadFrameBoundary = errors.New("not on frame boundary") ErrNotWebSocket = errors.New("not websocket protocol") ErrBadRequestMethod = errors.New("bad method") ErrNotSupported = errors.New("not supported") )
Functions ¶
Types ¶
type WebsocketConn ¶
type WebsocketConn struct { MaxPayloadBytes int // contains filtered or unexported fields }
func (*WebsocketConn) Close ¶
func (wc *WebsocketConn) Close() (err error)
func (*WebsocketConn) HandShakeHandle ¶
func (wc *WebsocketConn) HandShakeHandle() error
func (*WebsocketConn) LocalAddr ¶
func (wc *WebsocketConn) LocalAddr() net.Addr
func (*WebsocketConn) RemoteAddr ¶
func (wc *WebsocketConn) RemoteAddr() net.Addr
func (*WebsocketConn) SetDeadline ¶
func (wc *WebsocketConn) SetDeadline(t time.Time) error
func (*WebsocketConn) SetReadDeadline ¶
func (wc *WebsocketConn) SetReadDeadline(t time.Time) error
func (*WebsocketConn) SetWriteDeadline ¶
func (wc *WebsocketConn) SetWriteDeadline(t time.Time) error
Click to show internal directories.
Click to hide internal directories.