wsserver

package
v0.0.0-...-43fd707 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(s *Server) http.HandlerFunc

Types

type Client

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

Client is a middleman between the websocket connection and the hub.

func (*Client) Read

func (c *Client) Read() []byte

func (*Client) UID

func (c *Client) UID() int64

func (*Client) Write

func (c *Client) Write(buf []byte)

type Server

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

func NewServer

func NewServer() *Server

func (*Server) Broadcast

func (s *Server) Broadcast(message []byte)

func (*Server) GetProduce

func (s *Server) GetProduce() *Client

Jump to

Keyboard shortcuts

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