Increased size of socket buffer

This commit is contained in:
Jocke
2016-03-10 10:58:26 +01:00
parent 15c54d2be6
commit a0d60160dd
3 changed files with 3657 additions and 3654 deletions
+2 -1
View File
@@ -27,7 +27,8 @@ public:
// Check if we are trying to add more than the package can fit.
if (m_MaxPacketSize < m_Offset + sizeof(T)) {
if (m_MaxPacketSize >= 32000) {
LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
// This will spam couse 8 players are over 100 000 bytes
//LOG_WARNING("Package::WritePrimitive(): New size is huge %i bytes\n", m_MaxPacketSize*2);
}
resizeData();
}
File diff suppressed because it is too large Load Diff
+2
View File
@@ -15,6 +15,8 @@ bool UDPClient::Connect(std::string playerName, std::string address, int port)
}
m_ReceiverEndpoint = udp::endpoint(boost::asio::ip::address().from_string(address), port);
m_Socket = boost::shared_ptr<boost::asio::ip::udp::socket>(new boost::asio::ip::udp::socket(m_IOService));
boost::asio::socket_base::receive_buffer_size option(819200);
m_Socket->set_option(option);
m_Socket->open(boost::asio::ip::udp::v4());
return true;
}