MCPcopy
hub / github.com/grpc/grpc-go / start

Method start

credentials/xds/xds_client_test.go:109–118  ·  view source on GitHub ↗

starts actually starts listening on a local TCP port, and spawns a goroutine to handle new connections.

(ctx context.Context)

Source from the content-addressed store, hash-verified

107// starts actually starts listening on a local TCP port, and spawns a goroutine
108// to handle new connections.
109func (ts *testServer) start(ctx context.Context) error {
110 lis, err := net.Listen("tcp", "localhost:0")
111 if err != nil {
112 return err
113 }
114 ts.lis = lis
115 ts.address = lis.Addr().String()
116 go ts.handleConn(ctx)
117 return nil
118}
119
120// handleConn accepts a new raw connection, and invokes the test provided
121// handshake function to perform TLS handshake, and returns the result on the

Callers 1

Calls 3

handleConnMethod · 0.95
StringMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected