summaryrefslogtreecommitdiff
path: root/core/io/udp_server.h
diff options
context:
space:
mode:
authordam <daniel.almeida.martins@outlook.com>2021-03-21 10:15:30 +0000
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-04-12 21:05:33 +0200
commitda8c2310b5b2eae941fa1465495409086397127f (patch)
treee010f94062e83bb88ce739a75c01a86dcce9c7b5 /core/io/udp_server.h
parentcee5414698b14be3ce837b4c9de3a3d500d28611 (diff)
Allow local port control on net_socket connections
Diffstat (limited to 'core/io/udp_server.h')
-rw-r--r--core/io/udp_server.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/io/udp_server.h b/core/io/udp_server.h
index bbd2f951c9..298d4d4b63 100644
--- a/core/io/udp_server.h
+++ b/core/io/udp_server.h
@@ -53,21 +53,18 @@ protected:
};
uint8_t recv_buffer[PACKET_BUFFER_SIZE];
- int bind_port = 0;
- IP_Address bind_address;
-
List<Peer> peers;
List<Peer> pending;
int max_pending_connections = 16;
Ref<NetSocket> _sock;
-
static void _bind_methods();
public:
void remove_peer(IP_Address p_ip, int p_port);
Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*"));
Error poll();
+ int get_local_port() const;
bool is_listening() const;
bool is_connection_available() const;
void set_max_pending_connections(int p_max);