Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Fields      []baker.FieldIndex
	FieldByName func(string) (baker.FieldIndex, bool)
}

    Conf holds required configurations that are passed to NewServer to configure the Server

    type Server

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

      Server represents the websocket server.

      func NewServer

      func NewServer(c Conf) *Server

        NewServer creates new chat server.

        func (*Server) Listen

        func (s *Server) Listen()

          Listen and serve. It serves client connection and broadcast request.

          func (*Server) SendAll

          func (s *Server) SendAll(msg []string)

            SendAll sends a message to all connected clients. Used by the output component to broadcast the message to the clients