Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialOptions ¶
type WebsocketSession ¶
type WebsocketSession struct {
// contains filtered or unexported fields
}
func ConnectWebsocketSession ¶
func ConnectWebsocketSession(opts *DialOptions) (*WebsocketSession, error)
func NewWebsocketSession ¶
func NewWebsocketSession(conn *websocket.Conn) *WebsocketSession
func (*WebsocketSession) Close ¶
func (w *WebsocketSession) Close(status uint32, reason string) error
Close closes the session with provided code and reason.
func (*WebsocketSession) Recv ¶
func (w *WebsocketSession) Recv() (string, error)
Recv reads one text frame from session
func (*WebsocketSession) RemoteAddr ¶
func (w *WebsocketSession) RemoteAddr() string
func (*WebsocketSession) Send ¶
func (w *WebsocketSession) Send(str string) error
Send sends one text frame to session
type XHRSession ¶
type XHRSession struct {
// contains filtered or unexported fields
}
func NewXHRSession ¶
func NewXHRSession(opts *DialOptions) (*XHRSession, error)
NewXHRSession returns a new XHRSession, a SockJS client which supports xhr-polling http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-74
func (*XHRSession) ID ¶
func (x *XHRSession) ID() string
func (*XHRSession) Recv ¶
func (x *XHRSession) Recv() (string, error)
func (*XHRSession) Send ¶
func (x *XHRSession) Send(frame string) error
Click to show internal directories.
Click to hide internal directories.