Versions in this module Expand all Collapse all v3 v3.0.1 Nov 16, 2021 v3.0.0 Jul 23, 2021 Changes in this version + var DefaultOptions = Options + var ErrSessionNotOpen = errors.New("sockjs: session not in open state") + func DefaultJSessionID(rw http.ResponseWriter, req *http.Request) + type Handler struct + func NewHandler(prefix string, opts Options, handlerFunc func(Session)) *Handler + func (h *Handler) Prefix() string + func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) + type Options struct + CheckOrigin func(*http.Request) bool + DisconnectDelay time.Duration + HeartbeatDelay time.Duration + JSessionID func(http.ResponseWriter, *http.Request) + Origin string + RawWebsocket bool + ResponseLimit uint32 + SockJSURL string + Websocket bool + WebsocketUpgrader *websocket.Upgrader + WebsocketWriteTimeout time.Duration + type ReceiverType int + const ReceiverTypeEventSource + const ReceiverTypeHtmlFile + const ReceiverTypeJSONP + const ReceiverTypeNone + const ReceiverTypeRawWebsocket + const ReceiverTypeWebsocket + const ReceiverTypeXHR + const ReceiverTypeXHRStreaming + type Session struct + func (s Session) Close(status uint32, reason string) error + func (s Session) Context() context.Context + func (s Session) GetSessionState() SessionState + func (s Session) ID() string + func (s Session) ReceiverType() ReceiverType + func (s Session) Recv() (string, error) + func (s Session) RecvCtx(ctx context.Context) (string, error) + func (s Session) Request() *http.Request + func (s Session) Send(msg string) error + type SessionState uint32 + const SessionActive + const SessionClosed + const SessionClosing + const SessionOpening Other modules containing this package github.com/admpub/sockjs-go