server

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

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
	Delimiter   []byte
	BUF_SIZE    int
	Enc_func    func([]byte) []byte
	Dec_func    func([]byte) ([]byte, error)
}

func New added in v1.1.6

func New(ip string, port int, conf *quickproto.Config) *Server

func (*Server) Accept

func (s *Server) Accept() (net.Conn, error)

func (*Server) Addr

func (s *Server) Addr() string

func (*Server) Listen

func (s *Server) Listen() error

func (*Server) Read

func (s *Server) Read(conn net.Conn) (*quickproto.Message, error)

func (*Server) Terminate

func (s *Server) Terminate() error

func (*Server) Write

func (s *Server) Write(conn net.Conn, msg *quickproto.Message) error

Jump to

Keyboard shortcuts

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