kite: github.com/coffeehc/kite/sockjsclient Index | Files

package sockjsclient

import "github.com/coffeehc/kite/sockjsclient"

Index

Package Files

sockjsclient.go xhr.go

type DialOptions Uses

type DialOptions struct {
    BaseURL                         string
    ReadBufferSize, WriteBufferSize int
    Timeout                         time.Duration
}

type Rand Uses

type Rand struct {
    sync.Mutex
    // contains filtered or unexported fields
}

Rand is a threaSafe rand.Rand type

type WebsocketSession Uses

type WebsocketSession struct {
    // contains filtered or unexported fields
}

func ConnectWebsocketSession Uses

func ConnectWebsocketSession(opts *DialOptions) (*WebsocketSession, error)

func NewWebsocketSession Uses

func NewWebsocketSession(conn *websocket.Conn) *WebsocketSession

func (*WebsocketSession) Close Uses

func (w *WebsocketSession) Close(status uint32, reason string) error

Close closes the session with provided code and reason.

func (*WebsocketSession) ID Uses

func (w *WebsocketSession) ID() string

ID returns a session id

func (*WebsocketSession) Recv Uses

func (w *WebsocketSession) Recv() (string, error)

Recv reads one text frame from session

func (*WebsocketSession) RemoteAddr Uses

func (w *WebsocketSession) RemoteAddr() string

func (*WebsocketSession) Send Uses

func (w *WebsocketSession) Send(str string) error

Send sends one text frame to session

type XHRSession Uses

type XHRSession struct {
    // contains filtered or unexported fields
}

func NewXHRSession Uses

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) Close Uses

func (x *XHRSession) Close(status uint32, reason string) error

func (*XHRSession) ID Uses

func (x *XHRSession) ID() string

func (*XHRSession) Recv Uses

func (x *XHRSession) Recv() (string, error)

func (*XHRSession) Send Uses

func (x *XHRSession) Send(frame string) error

Package sockjsclient imports 17 packages (graph). Updated 2016-07-30. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).