Documentation
¶
Index ¶
- Variables
- func Init(cnf *config.WebsocketConfig, dispatcher core.Dispatcher, ...)
- func ListenAndServe(stop <-chan bool) error
- func NewSession(conn *ws.Conn, opt *Opt) (io.WriteCloser, error)
- func Serve404(wrt http.ResponseWriter, req *http.Request)
- func TlsRedirect(toPort string) http.HandlerFunc
- type Opt
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Init ¶
func Init(cnf *config.WebsocketConfig, dispatcher core.Dispatcher, ticker *tw.TimingWheel)
func ListenAndServe ¶
func NewSession ¶
Types ¶
type Opt ¶
type Opt struct { Tls *config.WsTlsConfig Dispatcher core.Dispatcher Ticker *tw.TimingWheel IdleSessionTimeout time.Duration WriteWait time.Duration SessionQueueSize int QueueOutTimeout time.Duration ReadBufferSize int WriteBufferSize int IDSalt string CheckOrigin func(*http.Request) bool // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.