Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UpgraderCheckOriginErr = fmt.Errorf("request origin not allowed by Upgrader.CheckOrigin")
Functions ¶
This section is empty.
Types ¶
type Upgrader ¶
func (*Upgrader) Upgrade ¶
func (u *Upgrader) Upgrade( w http.ResponseWriter, r *http.Request, responseHeader http.Header, ) (*websocket.Conn, http.ResponseWriter, *WebsocketSafeReadWriter, error)
type WebsocketResponseWriter ¶
type WebsocketResponseWriter struct {
// contains filtered or unexported fields
}
func (*WebsocketResponseWriter) Header ¶
func (w *WebsocketResponseWriter) Header() http.Header
no HTTP headers in websocket protocol
func (*WebsocketResponseWriter) Write ¶
func (w *WebsocketResponseWriter) Write(data []byte) (int, error)
Write attempts to write a message to the websocket connection
func (*WebsocketResponseWriter) WriteHeader ¶
func (w *WebsocketResponseWriter) WriteHeader(statusCode int)
no-op; no HTTP headers in websocket protocol
type WebsocketSafeReadWriter ¶
type WebsocketSafeReadWriter struct {
// contains filtered or unexported fields
}
func (*WebsocketSafeReadWriter) ReadMessage ¶
func (w *WebsocketSafeReadWriter) ReadMessage() (messageType int, p []byte, err error)
func (*WebsocketSafeReadWriter) Write ¶
func (w *WebsocketSafeReadWriter) Write(data []byte) (int, error)
func (*WebsocketSafeReadWriter) WriteJSONWithChannel ¶
func (w *WebsocketSafeReadWriter) WriteJSONWithChannel(v interface{}, errorChan chan<- error)
Click to show internal directories.
Click to hide internal directories.