summaryrefslogtreecommitdiff
path: root/core/io/packet_peer_udp.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-27 15:04:30 +0200
committerGitHub <noreply@github.com>2021-04-27 15:04:30 +0200
commit72bd64c1d50330f508afc3e6587ec113a8ed7605 (patch)
tree67afdbb9d2c30c5e6b3e65bc3b0fb5c944f8ff6d /core/io/packet_peer_udp.h
parent2a1f3c494421e1cf1a675be339dbe0227ebe28da (diff)
parent4d5c8e0b1835be586b2d57d7db0953110d166a14 (diff)
Merge pull request #47398 from Faless/feature/network-local-port-salvaged
Diffstat (limited to 'core/io/packet_peer_udp.h')
-rw-r--r--core/io/packet_peer_udp.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 4bac6994fc..b9d11c465c 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -70,10 +70,10 @@ protected:
public:
void set_blocking_mode(bool p_enable);
- Error listen(int p_port, const IP_Address &p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536);
+ Error bind(int p_port, const IP_Address &p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536);
void close();
Error wait();
- bool is_listening() const;
+ bool is_bound() const;
Error connect_shared_socket(Ref<NetSocket> p_sock, IP_Address p_ip, uint16_t p_port, UDPServer *ref); // Used by UDPServer
void disconnect_shared_socket(); // Used by UDPServer
@@ -83,6 +83,7 @@ public:
IP_Address get_packet_address() const;
int get_packet_port() const;
+ int get_local_port() const;
void set_dest_address(const IP_Address &p_address, int p_port);
Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;