aboutsummaryrefslogtreecommitdiff
path: root/core/io/tcp_server.h
diff options
context:
space:
mode:
authorFabio Alessandrelli2016-11-30 20:45:19 +0100
committerFabio Alessandrelli2017-01-04 00:46:32 +0100
commita46a643f90b4a5e93f94e9223e58a7bf83dc4e2a (patch)
tree1b7c097008eb4a47257a9af519a26f15a1ac4220 /core/io/tcp_server.h
parentc030e602e52034a4dc9f26b76e55ecd272f4cf6f (diff)
downloadgodot-a46a643f90b4a5e93f94e9223e58a7bf83dc4e2a.tar.gz
godot-a46a643f90b4a5e93f94e9223e58a7bf83dc4e2a.tar.zst
godot-a46a643f90b4a5e93f94e9223e58a7bf83dc4e2a.zip
Use an instance variable for ip_type in raw sockets
PacketPeerUDP/StreamPeerTCP/TCP_Server now uses an instance variable to store the selected ip_type (IPv4/IPv6/ANY, where ANY = dual stack). All calls to resolve addresses, sending/receving data, connecting/listening will use that socket type. (cherry picked from commit 95bdd977686005d3d813eb09aca625384f1774c1)
Diffstat (limited to 'core/io/tcp_server.h')
-rw-r--r--core/io/tcp_server.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h
index 026789500..c380db52d 100644
--- a/core/io/tcp_server.h
+++ b/core/io/tcp_server.h
@@ -38,14 +38,16 @@ class TCP_Server : public Reference {
OBJ_TYPE( TCP_Server, Reference );
protected:
+ IP_Address::AddrType ip_type;
+
static TCP_Server* (*_create)();
//bind helper
- Error _listen(uint16_t p_port, IP_Address::AddrType p_type = IP_Address::TYPE_ANY ,DVector<String> p_accepted_hosts=DVector<String>());
+ Error _listen(uint16_t p_port, DVector<String> p_accepted_hosts=DVector<String>());
static void _bind_methods();
public:
- virtual Error listen(uint16_t p_port, IP_Address::AddrType p_type = IP_Address::TYPE_ANY, const List<String> *p_accepted_hosts=NULL)=0;
+ virtual Error listen(uint16_t p_port, const List<String> *p_accepted_hosts=NULL)=0;
virtual bool is_connection_available() const=0;
virtual Ref<StreamPeerTCP> take_connection()=0;