Documentation ¶
Index ¶
- Constants
- func NewSessions() *sessions
- func ToEOH(err error) error
- type CORScredentials
- type CORSenable
- type CORSheadersAllow
- type CORSheadersExpose
- type CORSmaxAge
- type CORSmethods
- type CORSoptionsSuccessStatus
- type CORSorigin
- type EIOServer
- type EIOVersionInt
- type EIOVersionStr
- type Option
- func WithCodec(codec eiot.Codec) Option
- func WithCookie(name, path string, httpOnly bool) Option
- func WithCors(opts ...corsOption) Option
- func WithGenerateIDFunc(fn func() SessionID) Option
- func WithInitialPackets(fn func(eiot.Transporter, *http.Request)) Option
- func WithMaxPayload(n int) Option
- func WithPath(path string) Option
- func WithPingInterval(d time.Duration) Option
- func WithPingTimeout(d time.Duration) Option
- func WithSessionShave(d time.Duration) Option
- func WithTransport(name eiot.Name, tr func(SessionID, eiot.Codec) eiot.Transporter) Option
- func WithTransportChannelBuffer(n int) Option
- func WithTransportOption(opts ...eiot.Option) Option
- func WithUpgradeTimeout(d time.Duration) Option
- type OptionWith
- type Server
- type SessionID
- type TransportName
Constants ¶
View Source
const ( ErrUnknownTransport = httpErrStr(erro.HTTPStatusError400 + "unknown transport") ErrUnknownSessionID = httpErrStr(erro.HTTPStatusError400 + "unknown session id") ErrUnknownEIOVersion = httpErrStr(erro.HTTPStatusError400 + "unknown engineio version") ErrInvalidRequestHTTPMethod = httpErrStr(erro.HTTPStatusError400 + "invalid request, an unimplemented HTTP method") ErrInvalidURIPath = httpErrStr(erro.HTTPStatusError400 + "invalid URI path, the prefix is not found") ErrTransportUpgradeFailed = httpErrStr(erro.HTTPStatusError400 + "failed to upgrade transport") EOH erro.State = "End Of Handshake" IOR erro.State = "Is OPTION Request" )
Variables ¶
This section is empty.
Functions ¶
func NewSessions ¶
func NewSessions() *sessions
Types ¶
type CORScredentials ¶
type CORScredentials bool
type CORSenable ¶
type CORSenable bool
type CORSheadersAllow ¶
type CORSheadersAllow []string
type CORSheadersExpose ¶
type CORSheadersExpose []string
type CORSmaxAge ¶
type CORSmaxAge int
type CORSmethods ¶
type CORSmethods []string
type CORSoptionsSuccessStatus ¶
type CORSoptionsSuccessStatus int
type CORSorigin ¶
type CORSorigin []string
type EIOServer ¶
type EIOServer interface { Server ServeTransport(http.ResponseWriter, *http.Request) (eiot.Transporter, error) }
type EIOVersionInt ¶
type EIOVersionInt int
type EIOVersionStr ¶
type EIOVersionStr string
const Version2 EIOVersionStr = "2"
const Version3 EIOVersionStr = "3"
const Version4 EIOVersionStr = "4"
const Version5 EIOVersionStr = "5"
func (EIOVersionStr) Int ¶
func (v EIOVersionStr) Int() EIOVersionInt
type Option ¶
func WithCookie ¶
func WithGenerateIDFunc ¶
func WithInitialPackets ¶
func WithInitialPackets(fn func(eiot.Transporter, *http.Request)) Option
func WithMaxPayload ¶
func WithPingInterval ¶
func WithPingTimeout ¶
func WithSessionShave ¶
func WithTransport ¶
func WithTransportOption ¶
func WithUpgradeTimeout ¶
type OptionWith ¶
type OptionWith = with.OptionWith
type Server ¶
type Server = interface { OptionWith ServeHTTP(http.ResponseWriter, *http.Request) }
func NewServerV2 ¶
func NewServerV3 ¶
func NewServerV4 ¶
func NewServerV5 ¶
type TransportName ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.