1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-06 17:25:19 +00:00

Implement TCP Server bind address

(cherry picked from commit b2839343ca)
This commit is contained in:
Fabio Alessandrelli
2017-01-18 08:37:24 +01:00
parent 90a747a52d
commit 43d992fc34
9 changed files with 49 additions and 29 deletions

View File

@@ -43,12 +43,11 @@ protected:
static TCP_Server *(*_create)();
//bind helper
Error _listen(uint16_t p_port, DVector<String> p_accepted_hosts = DVector<String>());
static void _bind_methods();
public:
virtual void set_ip_type(IP::Type p_type);
virtual Error listen(uint16_t p_port, const List<String> *p_accepted_hosts = NULL) = 0;
virtual Error listen(uint16_t p_port, const IP_Address p_bind_address = IP_Address("*")) = 0;
virtual bool is_connection_available() const = 0;
virtual Ref<StreamPeerTCP> take_connection() = 0;