Documentation
¶
Index ¶
- Constants
- Variables
- func SchedulePing(c *Channel)
- type Channel
- func (c *Channel) Ack(method string, timeout time.Duration, args ...interface{}) (interface{}, error)
- func (c *Channel) BinaryMessage() bool
- func (c *Channel) Emit(method string, args ...interface{}) error
- func (c *Channel) Id() string
- func (c *Channel) IsAlive() bool
- func (c *Channel) LocalAddr() net.Addr
- func (c *Channel) ReadBytes() int
- func (c *Channel) RemoteAddr() net.Addr
- func (c *Channel) WriteBytes() int
- type Client
- type ClientBuilder
- func (c *ClientBuilder) Build(addr string, opts ...ClientOption) (*Client, error)
- func (c *ClientBuilder) WithAuth(v map[string]string) ClientOption
- func (c *ClientBuilder) WithIOOpts(v map[string]string) ClientOption
- func (c *ClientBuilder) WithNamespace(v string) ClientOption
- func (c *ClientBuilder) WithPath(v string) ClientOption
- type ClientOption
- type ClientOptions
- type Header
Constants ¶
View Source
const ( DefaultCloseTxt = "transport close" DefaultCloseCode = 101 )
View Source
const ( OnMessage = "message" OnConnection = "connection" OnDisconnection = "disconnection" OnError = "error" )
Variables ¶
View Source
var ( ErrorCallerNotFunc = errors.New("f is not function") ErrorCallerMaxFiveArgs = errors.New("f maximum number of args is 5") ErrorCallerMaxFiveValues = errors.New("f maximum number of values is 5") )
View Source
var ( ErrorSendTimeout = errors.New("timeout") ErrorSocketOverflood = errors.New("socket overflood") )
View Source
var (
ErrorWaiterNotFound = errors.New("Waiter not found")
)
View Source
var (
ErrorWrongHeader = errors.New("Wrong header")
)
Functions ¶
func SchedulePing ¶
func SchedulePing(c *Channel)
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
* socket.io connection handler
use IsAlive to check that handler is still working use Dial to connect to websocket use In and Out channels for message exchange Close message means channel is closed ping is automatic
func (*Channel) BinaryMessage ¶
func (*Channel) RemoteAddr ¶
func (*Channel) WriteBytes ¶
type ClientBuilder ¶
type ClientBuilder struct{}
func (*ClientBuilder) Build ¶
func (c *ClientBuilder) Build(addr string, opts ...ClientOption) (*Client, error)
func (*ClientBuilder) WithAuth ¶
func (c *ClientBuilder) WithAuth(v map[string]string) ClientOption
func (*ClientBuilder) WithIOOpts ¶
func (c *ClientBuilder) WithIOOpts(v map[string]string) ClientOption
func (*ClientBuilder) WithNamespace ¶
func (c *ClientBuilder) WithNamespace(v string) ClientOption
func (*ClientBuilder) WithPath ¶
func (c *ClientBuilder) WithPath(v string) ClientOption
type ClientOption ¶
type ClientOption func(*ClientOptions)
type ClientOptions ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.