Documentation ¶
Index ¶
- Constants
- Variables
- func FilterHeader(header http.Header) http.Header
- func Send(ws *websocket.Conn, reader io.Reader, close <-chan struct{}) error
- func SendStream(server string, reader io.Reader, close <-chan struct{}) error
- func Write(ws *websocket.Conn, reader ReadBytes, stop <-chan struct{}, ...) error
- type ReadBytes
Constants ¶
View Source
const ( // WriteWait defines time allowed to write a message to the peer. WriteWait = 10 * time.Second // PongWait defines time allowed to read the next pong message from the peer. PongWait = 30 * time.Second // PingPeriod defines send pings to peer with this period. Must be less than pongWait. PingPeriod = (PongWait * 9) / 10 )
Variables ¶
View Source
var Upgrader = socket.Upgrader{ CheckOrigin: func(r *http.Request) bool { return true }, ReadBufferSize: 1024, WriteBufferSize: 1024, }
Upgrader ...
Functions ¶
func FilterHeader ¶
FilterHeader filters the headers for upgrading the HTTP server connection to the WebSocket protocol.
func SendStream ¶ added in v0.9.7
SendStream sends stream from reader to a remote websocket
Types ¶
Click to show internal directories.
Click to hide internal directories.