Connected indicates whether the client is connected through to at least one ARI websocket
()
| 377 | |
| 378 | // Connected indicates whether the client is connected through to at least one ARI websocket |
| 379 | func (c *Client) Connected() bool { |
| 380 | if c.closed { |
| 381 | return false |
| 382 | } |
| 383 | |
| 384 | // TODO: this is a surrogate indicator with low resolution... we should have |
| 385 | // something more proactive and concrete |
| 386 | if len(c.cluster.App(c.appName, proxy.AnnouncementInterval*2)) < 1 { |
| 387 | return false |
| 388 | } |
| 389 | return true |
| 390 | } |
| 391 | |
| 392 | // Close shuts down the client |
| 393 | func (c *Client) Close() { |
no test coverage detected