Documentation ¶
Index ¶
- type Message
- type MessageClient
- type MessageClientOption
- func WithCheckOrigin(predicate func(ctx *fasthttp.RequestCtx) bool) MessageClientOption
- func WithEnableCompression(enabled bool) MessageClientOption
- func WithError(action func(ctx *fasthttp.RequestCtx, status int, reason error)) MessageClientOption
- func WithHandshakeTimeout(timeout time.Duration) MessageClientOption
- func WithReadBufferSize(size int) MessageClientOption
- func WithSubprotocols(v []string) MessageClientOption
- func WithWriteBufferPool(pool websocket.BufferPool) MessageClientOption
- func WithWriteBufferSize(size int) MessageClientOption
- type MessageClientOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageClient ¶
type MessageClient struct { *app.MessageClientInfo // contains filtered or unexported fields }
func NewMessageClient ¶
func NewMessageClient(ctx *fasthttp.RequestCtx, opts ...MessageClientOption) *MessageClient
func (*MessageClient) Close ¶
func (client *MessageClient) Close() error
Close implements app.MessageSource.
func (*MessageClient) RegisterCloseHandler ¶
func (client *MessageClient) RegisterCloseHandler(proc func(app.MessageClient))
RegisterCloseHandler implements app.MessageClient.
func (*MessageClient) Send ¶
func (client *MessageClient) Send(format app.MessageFormat, payload []byte) error
Send implements app.MessageSource.
func (*MessageClient) Start ¶
func (client *MessageClient) Start(pipe *app.MessagePipe)
Start implements app.MessageSource.
type MessageClientOption ¶
type MessageClientOption interface {
// contains filtered or unexported methods
}
func WithCheckOrigin ¶
func WithCheckOrigin(predicate func(ctx *fasthttp.RequestCtx) bool) MessageClientOption
func WithEnableCompression ¶
func WithEnableCompression(enabled bool) MessageClientOption
func WithError ¶
func WithError(action func(ctx *fasthttp.RequestCtx, status int, reason error)) MessageClientOption
func WithHandshakeTimeout ¶
func WithHandshakeTimeout(timeout time.Duration) MessageClientOption
func WithReadBufferSize ¶
func WithReadBufferSize(size int) MessageClientOption
func WithSubprotocols ¶
func WithSubprotocols(v []string) MessageClientOption
func WithWriteBufferPool ¶
func WithWriteBufferPool(pool websocket.BufferPool) MessageClientOption
func WithWriteBufferSize ¶
func WithWriteBufferSize(size int) MessageClientOption
type MessageClientOptionFunc ¶
type MessageClientOptionFunc func(*websocket.FastHTTPUpgrader)
Click to show internal directories.
Click to hide internal directories.