Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶ added in v1.3.6
type Starter ¶ added in v1.3.6
type Starter struct { bean.Component Handlers []WebsocketHandler }
func NewStarter ¶ added in v1.3.6
func NewStarter() *Starter
type WebsocketConfig ¶ added in v1.3.6
type WebsocketConfig struct { bean.Component // Time allowed to write a message to the peer. WriteWait time.Duration `yaml:"write_wait"` // Maximum message size allowed from peer. MaxMessageSize int64 `yaml:"max_message_size"` // Time allowed to read the next pong message from the peer. PongWait time.Duration `yaml:"pong_wait"` // Send pings to peer with this period. Must be less than pongWait. PingPeriod time.Duration `yaml:"ping_period"` // Time to wait before force close on connection. CloseGracePeriod time.Duration `yaml:"close_grace_period"` CheckOrigin bool `yaml:"check_origin"` }
WebsocketConfig is websocket config
func (*WebsocketConfig) Prefix ¶ added in v1.3.6
func (w *WebsocketConfig) Prefix() string
type WebsocketController ¶
type WebsocketController struct { Config *WebsocketConfig // contains filtered or unexported fields }
WebsocketController is decorate dynamic controller
func (*WebsocketController) Bean ¶
func (w *WebsocketController) Bean() string
func (*WebsocketController) Channel ¶
func (w *WebsocketController) Channel(r *http.Request, rw http.ResponseWriter)
func (*WebsocketController) Controller ¶
func (w *WebsocketController) Controller() string
Click to show internal directories.
Click to hide internal directories.