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.
This commit is contained in:
Fabio Alessandrelli 2017-01-19 13:33:10 +01:00
parent 68dc969f8c
commit 9336857132
2 changed files with 4 additions and 4 deletions

View file

@ -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() {

View file

@ -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() {