From 887a897c02144f2d01896d3112bdae5ce7d6df5c Mon Sep 17 00:00:00 2001 From: Ariel Manzur Date: Tue, 18 Oct 2016 18:53:18 -0300 Subject: adding ipv6 --- core/io/tcp_server.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/io/tcp_server.cpp') diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp index 274d20a48a..53d6e900f3 100644 --- a/core/io/tcp_server.cpp +++ b/core/io/tcp_server.cpp @@ -30,6 +30,8 @@ TCP_Server* (*TCP_Server::_create)()=NULL; +VARIANT_ENUM_CAST(IP_Address::AddrType); + Ref TCP_Server::create_ref() { if (!_create) @@ -44,19 +46,19 @@ TCP_Server* TCP_Server::create() { return _create(); } -Error TCP_Server::_listen(uint16_t p_port,DVector p_accepted_hosts) { +Error TCP_Server::_listen(uint16_t p_port, IP_Address::AddrType p_type, DVector p_accepted_hosts) { List hosts; for(int i=0;i())); + ObjectTypeDB::bind_method(_MD("listen","port","accepted_hosts"),&TCP_Server::_listen,DEFVAL(IP_Address::TYPE_IPV4), DEFVAL(DVector())); ObjectTypeDB::bind_method(_MD("is_connection_available"),&TCP_Server::is_connection_available); ObjectTypeDB::bind_method(_MD("take_connection"),&TCP_Server::take_connection); ObjectTypeDB::bind_method(_MD("stop"),&TCP_Server::stop); -- cgit v1.2.3