MCPcopy Index your code
hub / github.com/docker/cli / accept

Method accept

cli-plugins/socket/socket.go:67–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65}
66
67func (pl *PluginServer) accept() error {
68 conn, err := pl.l.Accept()
69 if err != nil {
70 return err
71 }
72
73 pl.mu.Lock()
74 defer pl.mu.Unlock()
75
76 if pl.closed {
77 // Handle potential race between Close and accept.
78 conn.Close()
79 return errors.New("plugin server is closed")
80 }
81
82 pl.conns = append(pl.conns, conn)
83
84 go pl.h(conn)
85 return nil
86}
87
88// Addr returns the [net.Addr] of the underlying [net.Listener].
89func (pl *PluginServer) Addr() net.Addr {

Callers 1

NewPluginServerFunction · 0.95

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected