Created
December 19, 2016 09:00
-
-
Save yanzay/bc40ddcac66c8db73b15129434e4f09d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func startClient(addr string) { | |
conn, err := net.Dial("tcp", addr) | |
if err != nil { | |
fmt.Printf("Can't connect to server: %s\n", err) | |
return | |
} | |
_, err = io.Copy(conn, os.Stdin) | |
if err != nil { | |
fmt.Printf("Connection error: %s\n", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment