Documentation ¶
Index ¶
- type Websocket
- func (w *Websocket) Connect(msg *message.Message) error
- func (w *Websocket) Disconnect(m *message.Message) error
- func (w *Websocket) Handshake(msg *message.Message) (resp *message.Message, err error)
- func (w *Websocket) Init(endpoint string, options *transport.Options) error
- func (w *Websocket) Name() string
- func (w *Websocket) Options() *transport.Options
- func (w *Websocket) SendMessage(m *message.Message) error
- func (w *Websocket) SetOnErrorHandler(onError func(err error))
- func (w *Websocket) SetOnMessageReceivedHandler(onMsg func(*message.Message))
- func (w *Websocket) SetOnTransportDownHandler(onTransportDown func(err error))
- func (w *Websocket) SetOnTransportUpHandler(onTransportUp func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Websocket ¶
type Websocket struct {
// contains filtered or unexported fields
}
Websocket represents an websocket transport for the faye protocol
func (*Websocket) Connect ¶
Init is called after a client has discovered the server’s capabilities with a handshake exchange, a connection is established by sending a message to the /meta/connect channel
func (*Websocket) Disconnect ¶
Disconnect closes all subscriptions and inform the server to remove any client-related state. any subsequent method call to the client object will result in undefined behaviour.
func (*Websocket) Handshake ¶
Handshake initiates a connection negotiation by sending a message to the /meta/handshake channel.
func (*Websocket) SetOnErrorHandler ¶
Init initializes the transport with the provided options
func (*Websocket) SetOnMessageReceivedHandler ¶
func (*Websocket) SetOnTransportDownHandler ¶
func (*Websocket) SetOnTransportUpHandler ¶
func (w *Websocket) SetOnTransportUpHandler(onTransportUp func())
Click to show internal directories.
Click to hide internal directories.