[Temp Fix]Player Packet Buffer Overflow

Posts 15 of 5 · Page 1 of 1
[Temp Fix]Player Packet Buffer Overflow
This will fix a few minor things in packet sending

[Tutorial]
Files we Edit: ClientProcessor.cs

Time to fix: roughly 2 - 4 minutes pending on your understanding of visual studio

[Lets Start]
Step 1: Open up your server.sln
Step 2: Go to ClientProcessor.cs which is located in wServer
Step 3: Open the Player.cs

Find:
Code:
public void SendPacket(Packet pkt)
{
       pending.Enqueue(pkt);
       sendLock.Set();
}
[Replace With]
Code:
public void SendPacket(Packet pkt)
        {
            try
            {
                pending.Enqueue(pkt);
                sendLock.Set();
            }catch(Exception e){}
        }
This will temp fix your packet sending crash, this also partly fix to many packets sending at once
Useful.
post2short

---------- Post added at 04:01 AM ---------- Previous post was at 03:55 AM ----------

Might have changed the SendPackets function too tho.

---------- Post added at 04:02 AM ---------- Previous post was at 04:01 AM ----------

Another thing, "roughly 15 minutes" - wtf? Who needs 15 minutes to add a try-catch? I understand most of the people here on MPGH isn't used to this, but I doubt they can't press CTRL+F and search for the function lol
Quote Originally Posted by Trapped View Post
Useful.
post2short

---------- Post added at 04:01 AM ---------- Previous post was at 03:55 AM ----------

Might have changed the SendPackets function too tho.

---------- Post added at 04:02 AM ---------- Previous post was at 04:01 AM ----------

Another thing, "roughly 15 minutes" - wtf? Who needs 15 minutes to add a try-catch? I understand most of the people here on MPGH isn't used to this, but I doubt they can't press CTRL+F and search for the function lol
This is just a temp fix till I can fully patch the Queuing in it, right now the queue being used can't handle request cause of the amount of packet ROTMG sends back and forth
When I compile I get this errors:
your probably using club55s, not sure if its needed, but just ignore the
Code:
                pending.Enqueue(pkt);
                sendLock.Set();
parts of it, thou not sure it will help or not, but it went back together just fine.
Posts 15 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?