forked from frero/hanabi
16 lines
335 B
Odin
16 lines
335 B
Odin
package hanabi
|
|
|
|
import "core:fmt"
|
|
import "core:net"
|
|
|
|
|
|
run_client :: proc(host_addr: net.Endpoint) {
|
|
sock, list_err := net.dial_tcp(host_addr)
|
|
if list_err != nil do panic(fmt.tprintln("failed to dial:", net.to_string(host_addr)))
|
|
defer net.close(sock)
|
|
buf: [256]byte
|
|
net.recv(sock, buf[:])
|
|
fmt.println(transmute(string)buf[:])
|
|
}
|
|
|