From d9525082feb6165944082fb80ae7785b23a2250c Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 18 Jan 2017 12:47:12 +0100 Subject: Remove set_ip_type from network classes (no longer needed) - TCP: - `listen` bind to wildcard "*" -> dual stack socket - `listen` bind to address -> socket from address type - `connect` -> resolve using best protocol (UNSPEC), socket from address type - UDP: - `listen` bind to wildcard "*" -> dual stack socket - `listen` bind to address -> socket from address type - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type (to change socket type you must first call `close` it) (cherry picked from commit 88a56ba783d36d52a1023759e69f026b1ae255b4) --- drivers/unix/stream_peer_tcp_posix.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/unix/stream_peer_tcp_posix.cpp') diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp index 779d9e427..9f551a8f4 100644 --- a/drivers/unix/stream_peer_tcp_posix.cpp +++ b/drivers/unix/stream_peer_tcp_posix.cpp @@ -122,10 +122,9 @@ Error StreamPeerTCPPosix::_poll_connection(bool p_block) const { return OK; }; -void StreamPeerTCPPosix::set_socket(int p_sockfd, IP_Address p_host, int p_port, IP::Type p_ip_type) { +void StreamPeerTCPPosix::set_socket(int p_sockfd, IP_Address p_host, int p_port, IP::Type p_sock_type) { - ip_type = p_ip_type; - sock_type = p_ip_type; + sock_type = p_sock_type; sockfd = p_sockfd; #ifndef NO_FCNTL fcntl(sockfd, F_SETFL, O_NONBLOCK); @@ -395,7 +394,6 @@ StreamPeerTCPPosix::StreamPeerTCPPosix() { sockfd = -1; status = STATUS_NONE; peer_port = 0; - ip_type = IP::TYPE_ANY; }; StreamPeerTCPPosix::~StreamPeerTCPPosix() { -- cgit v1.2.3-70-g09d2