MCPcopy
hub / github.com/fabiolb/fabio / Server

Struct Server

proxy/tcp/server.go:26–40  ·  view source on GitHub ↗

Server implements a generic TCP server.

Source from the content-addressed store, hash-verified

24
25// Server implements a generic TCP server.
26type Server struct {
27 Handler Handler
28 conns map[net.Conn]bool
29 Addr string
30 // ListenAddr is the actual address the server is listening on.
31 // This is used for route lookup when PROXY protocol is enabled,
32 // since in.LocalAddr() returns the destination from the PROXY header.
33 ListenAddr string
34
35 listeners []net.Listener
36 ReadTimeout time.Duration
37 WriteTimeout time.Duration
38
39 mu sync.Mutex
40}
41
42func (s *Server) ListenAndServe() error {
43 l, err := net.Listen("tcp", s.Addr)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected