mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net: add UdpSocket.address() method (#13524)
This commit is contained in:
parent
09f08e1fee
commit
dbae2d6af4
@ -259,6 +259,11 @@ fn new_udp_socket_for_remote(raddr Addr) ?&UdpSocket {
|
|||||||
return sock
|
return sock
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// address gets the address of a socket
|
||||||
|
pub fn (s &UdpSocket) address() ?Addr {
|
||||||
|
return addr_from_socket_handle(s.handle)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn (mut s UdpSocket) set_option_bool(opt SocketOption, value bool) ? {
|
pub fn (mut s UdpSocket) set_option_bool(opt SocketOption, value bool) ? {
|
||||||
// TODO reenable when this `in` operation works again
|
// TODO reenable when this `in` operation works again
|
||||||
// if opt !in opts_can_set {
|
// if opt !in opts_can_set {
|
||||||
|
Loading…
Reference in New Issue
Block a user