The API provides a handler for a WebSocket stream API.
| 17 | |
| 18 | // The API provides a handler for a WebSocket stream API. |
| 19 | type API struct { |
| 20 | clients map[uint][]*client |
| 21 | lock sync.RWMutex |
| 22 | pingPeriod time.Duration |
| 23 | pongTimeout time.Duration |
| 24 | upgrader *websocket.Upgrader |
| 25 | } |
| 26 | |
| 27 | // New creates a new instance of API. |
| 28 | // pingPeriod: is the interval, in which is server sends the a ping to the client. |
nothing calls this directly
no outgoing calls
no test coverage detected