MCPcopy
hub / github.com/coder/websocket / newClient

Function newClient

internal/examples/chat/chat_test.go:189–201  ·  view source on GitHub ↗
(ctx context.Context, url string)

Source from the content-addressed store, hash-verified

187}
188
189func newClient(ctx context.Context, url string) (*client, error) {
190 c, _, err := websocket.Dial(ctx, url+"/subscribe", nil)
191 if err != nil {
192 return nil, err
193 }
194
195 cl := &client{
196 url: url,
197 c: c,
198 }
199
200 return cl, nil
201}
202
203func (cl *client) publish(ctx context.Context, msg string) (err error) {
204 defer func() {

Callers 1

Test_chatServerFunction · 0.85

Calls 1

DialFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…