MCPcopy
hub / github.com/cloudfoundry/cli / keepalive

Function keepalive

cf/ssh/ssh.go:421–431  ·  view source on GitHub ↗
(conn ssh.Conn, ticker *time.Ticker, stopCh chan struct{})

Source from the content-addressed store, hash-verified

419}
420
421func keepalive(conn ssh.Conn, ticker *time.Ticker, stopCh chan struct{}) {
422 for {
423 select {
424 case <-ticker.C:
425 _, _, _ = conn.SendRequest("keepalive@cloudfoundry.org", true, nil)
426 case <-stopCh:
427 ticker.Stop()
428 return
429 }
430 }
431}
432
433func (c *secureShell) terminalType() string {
434 term := os.Getenv("TERM")

Callers 2

InteractiveSessionMethod · 0.70
WaitMethod · 0.70

Calls 2

SendRequestMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected