Documentation ¶
Overview ¶
Package ws wraps the gorilla websocket to provide a handler and maintain pinging by default.
This project is currently under development and is not fit for production use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
A Client maintains a connection to a client.
type Handler ¶
type Handler struct { Upgrader websocket.Upgrader Logger *log.Logger PingInterval time.Duration WriteTimeout time.Duration ReadTimeout time.Duration ConnectListener func(*Client) MessageListener func(*Client, []byte) ErrorListener func(*Client, error) CloseListener func(*Client) }
A Handler upgrades to a websocket and starts the client that maintains the connection.
Click to show internal directories.
Click to hide internal directories.