MCPcopy Index your code
hub / github.com/coder/coder / ServeClient

Method ServeClient

tailnet/service.go:110–123  ·  view source on GitHub ↗
(ctx context.Context, version string, conn net.Conn, streamID StreamID)

Source from the content-addressed store, hash-verified

108}
109
110func (s *ClientService) ServeClient(ctx context.Context, version string, conn net.Conn, streamID StreamID) error {
111 major, _, err := apiversion.Parse(version)
112 if err != nil {
113 s.Logger.Warn(ctx, "serve client called with unparsable version", slog.Error(err))
114 return err
115 }
116 switch major {
117 case 2:
118 return s.ServeConnV2(ctx, conn, streamID)
119 default:
120 s.Logger.Warn(ctx, "serve client called with unsupported version", slog.F("version", version))
121 return ErrUnsupportedVersion
122 }
123}
124
125func (s ClientService) ServeConnV2(ctx context.Context, conn net.Conn, streamID StreamID) error {
126 config := yamux.DefaultConfig()

Calls 3

ServeConnV2Method · 0.95
ParseFunction · 0.92
ErrorMethod · 0.45