Documentation ¶ Overview ¶ Package ws implements WebSocket API. Index ¶ func Init(readLimit int64) error func Serve(w http.ResponseWriter, r *http.Request) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Init ¶ func Init(readLimit int64) error Init must be called once before using this package. We may have to read about readLimit bytes before we'll notice attempt to send more (in case of WebSocket fragmented message), so try to keep readLimit small enough (about several KB). func Serve ¶ func Serve(w http.ResponseWriter, r *http.Request) Serve accepts WebSocket connections. Types ¶ This section is empty. Source Files ¶ View all Source files conn.go ws.go Click to show internal directories. Click to hide internal directories.