Documentation ¶
Index ¶
- type Connection
- type Event
- type Server
- func (s *Server) BoardCastEvent(event Event) error
- func (s *Server) BoardCastEventExceptSelf(event Event) error
- func (s *Server) Create(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleEvent(e *Event)
- func (s *Server) RegisterEventHandler(name string, h func(*Event))
- func (s *Server) Warp(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
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 ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BoardCastEvent ¶
func (*Server) BoardCastEventExceptSelf ¶
func (*Server) HandleEvent ¶
func (*Server) RegisterEventHandler ¶
Click to show internal directories.
Click to hide internal directories.