MCPcopy Create free account
hub / github.com/github/copilot-sdk / connectToServer

Method connectToServer

go/client.go:1993–2001  ·  view source on GitHub ↗

connectToServer establishes a connection to the server.

(ctx context.Context)

Source from the content-addressed store, hash-verified

1991
1992// connectToServer establishes a connection to the server.
1993func (c *Client) connectToServer(ctx context.Context) error {
1994 if c.useStdio {
1995 // Already connected via stdio in startCLIServer
1996 return nil
1997 }
1998
1999 // Connect via TCP
2000 return c.connectViaTCP(ctx)
2001}
2002
2003// connectViaTCP connects to the CLI server via TCP socket.
2004func (c *Client) connectViaTCP(ctx context.Context) error {

Callers 1

StartMethod · 0.95

Calls 1

connectViaTCPMethod · 0.95

Tested by

no test coverage detected