Documentation ¶
Overview ¶
Package websocket provides WebSocket connectivity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerConn ¶
type ServerConn struct {
// contains filtered or unexported fields
}
ServerConn is a server-side WebSocket connection with automatic, periodic ping-pong
func NewServerConn ¶
func NewServerConn(w http.ResponseWriter, req *http.Request) (*ServerConn, error)
NewServerConn allocates a ServerConn.
func (*ServerConn) ReadJSON ¶
func (c *ServerConn) ReadJSON(in interface{}) error
ReadJSON reads a JSON object.
func (*ServerConn) RemoteAddr ¶
func (c *ServerConn) RemoteAddr() net.Addr
RemoteAddr returns the remote address.
func (*ServerConn) WriteJSON ¶
func (c *ServerConn) WriteJSON(in interface{}) error
WriteJSON writes a JSON object.
Click to show internal directories.
Click to hide internal directories.