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:
parent
68dc969f8c
commit
9336857132
|
@ -160,7 +160,7 @@ void PacketPeerUDPPosix::close(){
|
||||||
::close(sockfd);
|
::close(sockfd);
|
||||||
sockfd=-1;
|
sockfd=-1;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
rb.resize(8);
|
rb.resize(16);
|
||||||
queue_count=0;
|
queue_count=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ PacketPeerUDPPosix::PacketPeerUDPPosix() {
|
||||||
queue_count=0;
|
queue_count=0;
|
||||||
peer_port=0;
|
peer_port=0;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
rb.resize(8);
|
rb.resize(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPeerUDPPosix::~PacketPeerUDPPosix() {
|
PacketPeerUDPPosix::~PacketPeerUDPPosix() {
|
||||||
|
|
|
@ -154,7 +154,7 @@ void PacketPeerUDPWinsock::close(){
|
||||||
::closesocket(sockfd);
|
::closesocket(sockfd);
|
||||||
sockfd=-1;
|
sockfd=-1;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
rb.resize(8);
|
rb.resize(16);
|
||||||
queue_count=0;
|
queue_count=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ PacketPeerUDPWinsock::PacketPeerUDPWinsock() {
|
||||||
queue_count=0;
|
queue_count=0;
|
||||||
peer_port=0;
|
peer_port=0;
|
||||||
sock_type = IP::TYPE_NONE;
|
sock_type = IP::TYPE_NONE;
|
||||||
rb.resize(8);
|
rb.resize(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {
|
PacketPeerUDPWinsock::~PacketPeerUDPWinsock() {
|
||||||
|
|
Loading…
Reference in New Issue