MCPcopy
hub / github.com/gliderlabs/ssh / handleRequests

Method handleRequests

server.go:322–337  ·  view source on GitHub ↗
(ctx Context, in <-chan *gossh.Request)

Source from the content-addressed store, hash-verified

320}
321
322func (srv *Server) handleRequests(ctx Context, in <-chan *gossh.Request) {
323 for req := range in {
324 handler := srv.RequestHandlers[req.Type]
325 if handler == nil {
326 handler = srv.RequestHandlers["default"]
327 }
328 if handler == nil {
329 req.Reply(false, nil)
330 continue
331 }
332 /*reqCtx, cancel := context.WithCancel(ctx)
333 defer cancel() */
334 ret, payload := handler(ctx, srv, req)
335 req.Reply(ret, payload)
336 }
337}
338
339// ListenAndServe listens on the TCP network address srv.Addr and then calls
340// Serve to handle incoming connections. If srv.Addr is blank, ":22" is used.

Callers 1

HandleConnMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected