MCPcopy
hub / github.com/github/gh-ost / handleConnection

Method handleConnection

go/logic/server.go:171–180  ·  view source on GitHub ↗
(conn net.Conn)

Source from the content-addressed store, hash-verified

169}
170
171func (srv *Server) handleConnection(conn net.Conn) (err error) {
172 if conn != nil {
173 defer conn.Close()
174 }
175 command, _, err := bufio.NewReader(conn).ReadLine()
176 if err != nil {
177 return err
178 }
179 return srv.onServerCommand(string(command), bufio.NewWriter(conn))
180}
181
182// onServerCommand responds to a user's interactive command
183func (srv *Server) onServerCommand(command string, writer *bufio.Writer) (err error) {

Callers 1

ServeMethod · 0.95

Calls 2

onServerCommandMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected