summaryrefslogtreecommitdiff
path: root/src/net/tmwa/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r--src/net/tmwa/network.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 5beb05c20..783b4b773 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -85,7 +85,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
{
@@ -482,4 +483,15 @@ Uint16 Network::readWord(int pos)
#endif
}
+void Network::fixSendBuffer()
+{
+ if (mOutSize > BUFFER_LIMIT)
+ {
+ if (mState != CONNECTED)
+ mOutSize = 0;
+ else
+ flush();
+ }
+}
+
} // namespace TmwAthena