Versions in this module Expand all Collapse all v0 v0.0.4 Apr 15, 2024 Changes in this version + type Client struct + func NewClient(host string, port uint16, handler connection.Handler, ...) *Client + func NewTcpClient(host string, port uint16, handler connection.Handler) *Client + func NewTlsClient(host string, port uint16, handle connection.Handler, caCert []byte, ...) *Client + func NewUdpClient(host string, port uint16, handler connection.Handler) *Client + func NewUnixClient(path string, port uint16, handler connection.Handler) *Client + func (c *Client) Connect() (err error) + func (c *Client) Disconnect() (err error) + func (c *Client) Send(msg []byte) error + func (c *Client) TlsConfig(caCertificates []byte, verifyCert bool) error + type Server struct + func NewServer(host string, port uint16, handler connection.Handler, ...) *Server + func NewTcpServer(host string, port uint16, handler connection.Handler) *Server + func NewTlsServer(host string, port uint16, handle connection.Handler, certificate []byte, ...) *Server + func NewUdpServer(host string, port uint16, handler connection.Handler) *Server + func NewUnixServer(host string, port uint16, handler connection.Handler) *Server + func (s *Server) Broadcast(msg []byte) (err error) + func (s *Server) ClientIp(id int) (ip string, err error) + func (s *Server) ListenAndServe() (err error) + func (s *Server) Send(id int, msg []byte) (err error) + func (s *Server) Stop() + func (s *Server) TlsConfig(certificate []byte, privateKey []byte) (err error)