Sockets: Difference between revisions
→{{header|Go}}: minor updates for language change, and tested.
({{omit from|ZX Spectrum Basic}}) |
(→{{header|Go}}: minor updates for language change, and tested.) |
||
Line 302:
=={{header|Go}}==
Tested with nc -l 256
<lang go>package main
import "net"▼
import
"fmt"
)
func main() {
fmt.Println(err)
return
}
_, err = conn.Write([]byte("hello socket world"))
conn.Close()▼
if err != nil {
fmt.Println(err)
return
}
▲ conn.Close()
}</lang>
|