Files
docker-machine/ssh/ssh.go
Simon Thulbourn 709b0a84e3 Add SSH client
Signed-off-by: Simon Thulbourn <simon+github@thulbourn.com>
2015-04-21 15:37:09 +01:00

21 lines
264 B
Go

package ssh
import (
"net"
)
func WaitForTCP(addr string) error {
for {
conn, err := net.Dial("tcp", addr)
if err != nil {
continue
}
defer conn.Close()
if _, err = conn.Read(make([]byte, 1)); err != nil {
continue
}
break
}
return nil
}