You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
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 88a56ba783)
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user