diff options
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r-- | src/net/tmwa/network.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 5d5a84a64..9c84b2e25 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -87,7 +87,8 @@ short packet_lengths[] = -1, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -const unsigned int BUFFER_SIZE = 655360; +const unsigned int BUFFER_SIZE = 1000000; +const unsigned int BUFFER_LIMIT = 930000; namespace TmwAthena { @@ -487,4 +488,15 @@ Uint16 Network::readWord(int pos) #endif } +void Network::fixSendBuffer() +{ + if (mOutSize > BUFFER_LIMIT) + { + if (mState != CONNECTED) + mOutSize = 0; + else + flush(); + } +} + } // namespace TmwAthena |