MCPcopy Index your code
hub / github.com/cloudfoundry/cli / localForwardAcceptLoop

Method localForwardAcceptLoop

util/clissh/ssh.go:263–279  ·  view source on GitHub ↗
(listener net.Listener, addr string)

Source from the content-addressed store, hash-verified

261}
262
263func (c *SecureShell) localForwardAcceptLoop(listener net.Listener, addr string) {
264 defer listener.Close()
265
266 for {
267 conn, err := listener.Accept()
268 if err != nil {
269 //nolint:staticcheck
270 if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
271 time.Sleep(100 * time.Millisecond)
272 continue
273 }
274 return
275 }
276
277 go c.handleForwardConnection(conn, addr)
278 }
279}
280
281func (c *SecureShell) resize(resized <-chan os.Signal, session SecureSession, terminalFd uintptr) {
282 type resizeMessage struct {

Callers 1

LocalPortForwardMethod · 0.95

Implementers 4

secureShellcf/ssh/ssh.go
FakeSecureShellcf/ssh/sshfakes/fake_secure_shell.go
FakeSecureShellClientactor/sharedaction/sharedactionfakes/f
SecureShellutil/clissh/ssh.go

Calls 2

CloseMethod · 0.65

Tested by

no test coverage detected