Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
ListenAndServe will listen the port and serve your request
Types ¶
type Server ¶
type Server struct {
Addr string
WorkerPool WorkerPool
Handler func(net.Conn)
ErrHandler func(net.Conn, string)
RejectHandler func(net.Conn, string)
}
Server have all functions that you should define to deal connect
type WorkerPool ¶
WorkerPool provide Get and Put functions of pool
func DefaultWorkerPool ¶
func DefaultWorkerPool(cap ...uint) (WorkerPool, error)
DefaultWorkerPool return the default config of pool
Click to show internal directories.
Click to hide internal directories.