MCPcopy Create free account
hub / github.com/codealong-dev/ride-sharing / NewConnectionManager

Function NewConnectionManager

shared/messaging/connection_manager.go:37–41  ·  view source on GitHub ↗

Note that on multiple instances of the API gateway, the connection manager needs to store the connections on a separate shared storage.

()

Source from the content-addressed store, hash-verified

35
36// Note that on multiple instances of the API gateway, the connection manager needs to store the connections on a separate shared storage.
37func NewConnectionManager() *ConnectionManager {
38 return &ConnectionManager{
39 connections: make(map[string]*connWrapper),
40 }
41}
42
43func (cm *ConnectionManager) Upgrade(w http.ResponseWriter, r *http.Request) (*websocket.Conn, error) {
44 conn, err := upgrader.Upgrade(w, r, nil)

Callers 1

ws.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected