eio

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Ws   *websocket.Conn
	Uuid string
}

func NewConnection

func NewConnection(ws *websocket.Conn) *Connection

type Event

type Event struct {
	EventName string `json:"cmd"`
	Data      string `json:"data"`
	Uuid      string `json:"uuid"`
}

func ParseEvent

func ParseEvent(b []byte, uuid string) *Event

type Server

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

func NewServer

func NewServer() *Server

func (*Server) BoardCastEvent

func (s *Server) BoardCastEvent(event Event) error

func (*Server) BoardCastEventExceptSelf

func (s *Server) BoardCastEventExceptSelf(event Event) error

func (*Server) Create

func (s *Server) Create(w http.ResponseWriter, r *http.Request)

func (*Server) HandleEvent

func (s *Server) HandleEvent(e *Event)

func (*Server) RegisterEventHandler

func (s *Server) RegisterEventHandler(name string, h func(*Event))

func (*Server) Warp

func (s *Server) Warp(c *gin.Context)

Jump to

Keyboard shortcuts

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