mirror of
https://github.com/edubart/otclient.git
synced 2025-12-29 02:47:12 +01:00
fix tcp congestion
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "declarations.h"
|
||||
#include <boost/asio.hpp>
|
||||
#include <framework/core/timer.h>
|
||||
#include <framework/core/declarations.h>
|
||||
|
||||
class Connection : public std::enable_shared_from_this<Connection>, boost::noncopyable
|
||||
{
|
||||
@@ -34,6 +36,8 @@ class Connection : public std::enable_shared_from_this<Connection>, boost::nonco
|
||||
enum {
|
||||
READ_TIMEOUT = 30,
|
||||
WRITE_TIMEOUT = 30,
|
||||
SEND_INTERVAL = 1,
|
||||
SEND_BUFFER_SIZE = 65536,
|
||||
RECV_BUFFER_SIZE = 65536
|
||||
};
|
||||
|
||||
@@ -72,9 +76,13 @@ protected:
|
||||
asio::ip::tcp::resolver m_resolver;
|
||||
asio::ip::tcp::socket m_socket;
|
||||
|
||||
uint8 m_sendBuffer[SEND_BUFFER_SIZE];
|
||||
uint8 m_recvBuffer[RECV_BUFFER_SIZE];
|
||||
bool m_connected;
|
||||
bool m_connecting;
|
||||
int m_sendBufferSize;
|
||||
Timer m_sendTimer;
|
||||
ScheduledEventPtr m_sendEvent;
|
||||
|
||||
friend class Server;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user