v / vlib / net
Raw file | 11 loc (9 sloc) | 173 bytes | Latest commit hash f6844e976
1module net
2
3pub struct Socket {
4pub:
5 handle int
6}
7
8// address gets the address of a socket
9pub fn (s &Socket) address() !Addr {
10 return addr_from_socket_handle(s.handle)
11}