mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
make server a static lib, run it in a separate thread
issues to solve: - dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. 13CPackForLobby, 20LobbyClientConnected, 20LobbyClientConnected. - error setting socket option: set_option: No buffer space available
This commit is contained in:
@@ -33,8 +33,15 @@ using namespace boost::asio::ip;
|
||||
void CConnection::init()
|
||||
{
|
||||
socket->set_option(boost::asio::ip::tcp::no_delay(true));
|
||||
socket->set_option(boost::asio::socket_base::send_buffer_size(4194304));
|
||||
socket->set_option(boost::asio::socket_base::receive_buffer_size(4194304));
|
||||
try
|
||||
{
|
||||
socket->set_option(boost::asio::socket_base::send_buffer_size(4194304));
|
||||
socket->set_option(boost::asio::socket_base::receive_buffer_size(4194304));
|
||||
}
|
||||
catch (const boost::system::system_error & e)
|
||||
{
|
||||
logNetwork->error("error setting socket option: %s", e.what());
|
||||
}
|
||||
|
||||
enableSmartPointerSerialization();
|
||||
disableStackSendingByID();
|
||||
|
||||
Reference in New Issue
Block a user