diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2017-01-19 13:33:10 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2017-01-23 20:18:23 +0100 |
commit | 93368571326e3472522669b76998f58aed78864f (patch) | |
tree | 3c1dd89f00a461b9e77479aa684c29c3a462d31d | |
parent | 68dc969f8ca242d0c4f927a417557288e4b1b75f (diff) |
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.
-rw-r--r-- | drivers/unix/packet_peer_udp_posix.cpp | 4 | ||||
-rw-r--r-- | platform/windows/packet_peer_udp_winsock.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp index 7de54df043..a146a4a09f 100644 --- a/drivers/unix/packet_peer_udp_posix.cpp +++ b/drivers/unix/packet_peer_udp_posix.cpp @@ -160,7 +160,7 @@ void PacketPeerUDPPosix::close(){ ::close(sockfd); sockfd=-1; sock_type = IP::TYPE_NONE; - rb.resize(8); + rb.resize(16); queue_count=0; } @@ -275,7 +275,7 @@ PacketPeerUDPPosix::PacketPeerUDPPosix() { queue_count=0; peer_port=0; sock_type = IP::TYPE_NONE; - rb.resize(8); + rb.resize(16); } PacketPeerUDPPosix::~PacketPeerUDPPosix() { diff --git a/platform/windows/packet_peer_udp_winsock.cpp b/platform/windows/packet_peer_udp_winsock.cpp index 9f1617d540..e5eb062165 100644 --- a/platform/windows/packet_peer_udp_winsock.cpp +++ b/platform/windows/packet_peer_udp_winsock.cpp @@ -154,7 +154,7 @@ void PacketPeerUDPWinsock::close(){ ::closesocket(sockfd); sockfd=-1; sock_type = IP::TYPE_NONE; - rb.resize(8); + rb.resize(16); queue_count=0; } @@ -290,7 +290,7 @@ PacketPeerUDPWinsock::PacketPeerUDPWinsock() { queue_count=0; peer_port=0; sock_type = IP::TYPE_NONE; - rb.resize(8); + rb.resize(16); } PacketPeerUDPWinsock::~PacketPeerUDPWinsock() { |