Documentation
¶
Index ¶
- type Client
- type Server
- func (s *Server) Accept() (net.Conn, *Client, error)
- func (s *Server) Addr() string
- func (s *Server) Broadcast(msg *quickproto.Message) error
- func (s *Server) Listen() (net.Listener, error)
- func (s *Server) Read(client *Client) (*quickproto.Message, error)
- func (s *Server) Read_c(conn net.Conn) (*quickproto.Message, error)
- func (s *Server) RemoveClient(conn net.Conn)
- func (s *Server) Terminate() error
- func (s *Server) Write(client *Client, msg *quickproto.Message) error
- func (s *Server) Write_c(conn net.Conn, msg *quickproto.Message) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
IP string
PORT int
Listener net.Listener
UseEncoding bool
UseCrypto bool
Delimiter []byte
BUF_SIZE int
Enc_func func([]byte) []byte
Dec_func func([]byte) ([]byte, error)
CONFIG *quickproto.Config
Clients map[string]*Client
}
func (*Server) Broadcast ¶ added in v1.3.1
func (s *Server) Broadcast(msg *quickproto.Message) error
func (*Server) RemoveClient ¶ added in v1.3.1
Click to show internal directories.
Click to hide internal directories.