Thanks, folks!
It's clear now:
func sock() {
conn, err := net.Dial("tcp", "192.168.0.1:80")
if err != nil {
fmt.Printf("\nDial has an error for you: %v\n", err)
return
}
fmt.Fprintf(conn, "GET / HTTP/1.0\r\n\r\n")
status, err := bufio.NewReader(conn).ReadString('\n')
fmt.Printf("%v",status)
conn.Close()
}
I'm Go newcomer and stunned with threading compared to Python
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.