summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2017-01-19 13:33:10 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2017-01-23 20:18:23 +0100
commit93368571326e3472522669b76998f58aed78864f (patch)
tree3c1dd89f00a461b9e77479aa684c29c3a462d31d /drivers/unix
parent68dc969f8ca242d0c4f927a417557288e4b1b75f (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.
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/packet_peer_udp_posix.cpp4
1 files changed, 2 insertions, 2 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() {