kubernetes/vendor/golang.org/x/net/websocket/websocket.go

const ProtocolVersionHybi13

const ProtocolVersionHybi

const SupportedProtocolVersion

const ContinuationFrame

const TextFrame

const BinaryFrame

const CloseFrame

const PingFrame

const PongFrame

const UnknownFrame

const DefaultMaxPayloadBytes

type ProtocolError

func (err *ProtocolError) Error() string {}

var ErrBadProtocolVersion

var ErrBadScheme

var ErrBadStatus

var ErrBadUpgrade

var ErrBadWebSocketOrigin

var ErrBadWebSocketLocation

var ErrBadWebSocketProtocol

var ErrBadWebSocketVersion

var ErrChallengeResponse

var ErrBadFrame

var ErrBadFrameBoundary

var ErrNotWebSocket

var ErrBadRequestMethod

var ErrNotSupported

var ErrFrameTooLarge

type Addr

// Network returns the network type for a WebSocket, "websocket".
func (addr *Addr) Network() string {}

type Config

type serverHandshaker

type frameReader

type frameReaderFactory

type frameWriter

type frameWriterFactory

type frameHandler

type Conn

// Read implements the io.Reader interface:
// it reads data of a frame from the WebSocket connection.
// if msg is not large enough for the frame data, it fills the msg and next Read
// will read the rest of the frame data.
// it reads Text frame or Binary frame.
func (ws *Conn) Read(msg []byte) (n int, err error) {}

// Write implements the io.Writer interface:
// it writes data as a frame to the WebSocket connection.
func (ws *Conn) Write(msg []byte) (n int, err error) {}

// Close implements the io.Closer interface.
func (ws *Conn) Close() error {}

// IsClientConn reports whether ws is a client-side connection.
func (ws *Conn) IsClientConn() bool {}

// IsServerConn reports whether ws is a server-side connection.
func (ws *Conn) IsServerConn() bool {}

// LocalAddr returns the WebSocket Origin for the connection for client, or
// the WebSocket location for server.
func (ws *Conn) LocalAddr() net.Addr {}

// RemoteAddr returns the WebSocket location for the connection for client, or
// the Websocket Origin for server.
func (ws *Conn) RemoteAddr() net.Addr {}

var errSetDeadline

// SetDeadline sets the connection's network read & write deadlines.
func (ws *Conn) SetDeadline(t time.Time) error {}

// SetReadDeadline sets the connection's network read deadline.
func (ws *Conn) SetReadDeadline(t time.Time) error {}

// SetWriteDeadline sets the connection's network write deadline.
func (ws *Conn) SetWriteDeadline(t time.Time) error {}

// Config returns the WebSocket config.
func (ws *Conn) Config() *Config {}

// Request returns the http request upgraded to the WebSocket.
// It is nil for client side.
func (ws *Conn) Request() *http.Request {}

type Codec

// Send sends v marshaled by cd.Marshal as single frame to ws.
func (cd Codec) Send(ws *Conn, v interface{}

// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores
// in v. The whole frame payload is read to an in-memory buffer; max size of
// payload is defined by ws.MaxPayloadBytes. If frame payload size exceeds
// limit, ErrFrameTooLarge is returned; in this case frame is not read off wire
// completely. The next call to Receive would read and discard leftover data of
// previous oversized frame before processing next frame.
func (cd Codec) Receive(ws *Conn, v interface{}

func marshal(v interface{}

func unmarshal(msg []byte, payloadType byte, v interface{}

var Message

func jsonMarshal(v interface{}

func jsonUnmarshal(msg []byte, payloadType byte, v interface{}

var JSON