services

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.2.1

type Client struct {
	Conn    *websocket.Conn
	Send    chan []byte
	RoomIds []string
	UserId  string
}

func (*Client) ReadPump added in v0.2.1

func (c *Client) ReadPump()

Client -> Server

func (*Client) WritePump added in v0.2.1

func (c *Client) WritePump()

Server -> Client

type Connection added in v0.2.1

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

func (*Connection) AddClient added in v0.2.1

func (con *Connection) AddClient(c *Client)

func (*Connection) AddEvent added in v0.2.1

func (con *Connection) AddEvent(userId, roomId, eventName string, c *Client)

func (*Connection) Info added in v0.2.1

func (con *Connection) Info()

func (*Connection) RemoveClient added in v0.2.1

func (con *Connection) RemoveClient(c *Client)

func (*Connection) RemoveEvent added in v0.2.1

func (con *Connection) RemoveEvent(userId, roomId, eventName string, c *Client)

type EventClients added in v0.2.1

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

type RcvData added in v0.2.1

type RcvData struct {
	UserId    string
	RoomId    string `json:roomId`
	EventName string `json:eventName`
	Action    string `json:action,omitempty`
	Client    *Client
}

type RoomClients added in v0.2.1

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

type RoomUserClients added in v0.2.1

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

type Server added in v0.2.0

type Server struct {
	Connection
	Broadcast  chan []byte
	Register   chan *RcvData
	Unregister chan *RcvData
	Close      chan *Client
}
var Srv Server

func (*Server) Run added in v0.2.0

func (s *Server) Run()

type UserClients added in v0.2.1

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

Jump to

Keyboard shortcuts

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