mirror of
https://github.com/godotengine/godot.git
synced 2025-10-15 02:49:24 +00:00
Use default UDP ring buffer size of 65536 for clients
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.
(cherry picked from commit 9336857132
)
This commit is contained in:
@@ -158,7 +158,7 @@ void PacketPeerUDPPosix::close() {
|
||||
::close(sockfd);
|
||||
sockfd = -1;
|
||||
sock_type = IP::TYPE_NONE;
|
||||
rb.resize(8);
|
||||
rb.resize(16);
|
||||
queue_count = 0;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ PacketPeerUDPPosix::PacketPeerUDPPosix() {
|
||||
queue_count = 0;
|
||||
peer_port = 0;
|
||||
sock_type = IP::TYPE_NONE;
|
||||
rb.resize(8);
|
||||
rb.resize(16);
|
||||
}
|
||||
|
||||
PacketPeerUDPPosix::~PacketPeerUDPPosix() {
|
||||
|
@@ -152,7 +152,7 @@ void PacketPeerUDPWinsock::close() {
|
||||
::closesocket(sockfd);
|
||||
sockfd = -1;
|
||||
sock_type = IP::TYPE_NONE;
|
||||
rb.resize(8);
|
||||
rb.resize(16);
|
||||
queue_count = 0;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ PacketPeerUDPWinsock::PacketPeerUDPWinsock() {
|
||||
queue_count = 0;
|
||||
peer_port = 0;
|
||||
sock_type = IP::TYPE_NONE;
|
||||
rb.resize(8);
|
||||
rb.resize(16);
|
||||
}
|
||||
|
||||
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {
|
||||
|
Reference in New Issue
Block a user