MCPcopy
hub / github.com/XiaoMi/Gaea / Run

Method Run

proxy/server/server.go:160–177  ·  view source on GitHub ↗

Run proxy run and serve client request

()

Source from the content-addressed store, hash-verified

158
159// Run proxy run and serve client request
160func (s *Server) Run() error {
161 // start AdminServer first
162 go s.adminServer.Run()
163
164 // start Server
165 s.closed.Set(false)
166 for s.closed.Get() != true {
167 conn, err := s.listener.Accept()
168 if err != nil {
169 log.Warn("[server] listener accept error: %s", err.Error())
170 continue
171 }
172
173 go s.onConn(conn)
174 }
175
176 return nil
177}
178
179// Close close proxy server
180func (s *Server) Close() error {

Calls 6

onConnMethod · 0.95
WarnFunction · 0.92
GetMethod · 0.65
AcceptMethod · 0.65
ErrorMethod · 0.65
SetMethod · 0.45