socketio

package module
v0.0.0-...-854a0e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

README

golang socket.io client-side for nodejs socket.io server-side

client-side
go run client.go
server-side
node server.js

Documentation

Index

Constants

View Source
const (
	EventOpen      string = "open"
	EventConnect          = "connect"
	EventReconnect        = "reconnect"
	EventError            = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener func(args ...interface{})

type SocketClient

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

func Socket

func Socket(urlstring string, transport protocol.Transport) (*SocketClient, error)

func (*SocketClient) Connect

func (s *SocketClient) Connect(requestHeader http.Header)

func (*SocketClient) Disconnect

func (s *SocketClient) Disconnect()

func (*SocketClient) Emit

func (s *SocketClient) Emit(event string, args ...interface{})

func (*SocketClient) On

func (e *SocketClient) On(event string, listener Listener)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL