v/examples/net_peer_ip.v

6 lines
106 B
V
Raw Normal View History

import net
2021-02-23 18:43:44 +01:00
conn := net.dial_tcp('google.com:80') ?
peer_addr := conn.peer_addr() ?
println('$peer_addr')