MCPcopy Create free account
hub / github.com/koding/kite / ConnectWebsocketSession

Function ConnectWebsocketSession

sockjsclient/sockjsclient.go:170–177  ·  view source on GitHub ↗

ConnectWebsocketSession dials the remote specified in the opts and creates new websocket session. Deprecated: Use DialWebsocket instead.

(opts *DialOptions)

Source from the content-addressed store, hash-verified

168//
169// Deprecated: Use DialWebsocket instead.
170func ConnectWebsocketSession(opts *DialOptions) (*WebsocketSession, error) {
171 cfg := config.New()
172 cfg.Websocket.HandshakeTimeout = opts.Timeout
173 cfg.Websocket.ReadBufferSize = opts.ReadBufferSize
174 cfg.Websocket.WriteBufferSize = opts.WriteBufferSize
175
176 return DialWebsocket(opts.BaseURL, cfg)
177}
178
179// NewWebsocketSession creates new sockjs.Session from existing
180// websocket connection.

Callers

nothing calls this directly

Calls 1

DialWebsocketFunction · 0.85

Tested by

no test coverage detected