Jump to content

Recommended Posts

Posted (edited)

Make the packet size value a little larger.

 

I have discovered a very serious problem. When all players are performing "gq operations," we get a network disconnection after it's done more than 200 times.

later tested this with just mouse clicks and found that the disconnection happens at 1,500 clicks.

I've discovered that the IPX packet size is limited to 546.Could you please change it to 1400?

Also, please change MAX_SERIAL_PACKET_SIZE from 256 to 512.

Edited by LanceCN
Posted
 
#### SESSION.H
 
**old**:
```cpp
//...........................................................................
// Max sizes of packets we want to send
// The IPX packet's size is IPX's max size (546), rounded down to accommodate
// the max number of events possible.
//...........................................................................
#define  MAX_IPX_PACKET_SIZE        (((546 - sizeof(CommHeaderType)) / \
                                 sizeof(EventClass) ) * sizeof(EventClass))
#define  MAX_SERIAL_PACKET_SIZE     256
```
 
**new**:
```cpp
#define  MAX_IPX_PACKET_SIZE        (((1400 - sizeof(CommHeaderType)) / \
                                 sizeof(EventClass) ) * sizeof(EventClass))
#define  MAX_SERIAL_PACKET_SIZE     512
```
 
---
 
#### GLOBALS.CPP

 

**old**:
```cpp
IPXManagerClass Ipx (
   MAX (sizeof (GlobalPacketType), sizeof(RemoteFileTransferType)),
   ((546 - sizeof(CommHeaderType)) / sizeof(EventClass) ) * sizeof(EventClass),
   160,                                      // # entries in Global Queue
   32,                                       // # entries in Private Queues
   VIRGIN_SOCKET,
   IPXGlobalConnClass::COMMAND_AND_CONQUER0);
```
 
**new**:
```cpp
IPXManagerClass Ipx (
   MAX (sizeof (GlobalPacketType), sizeof(RemoteFileTransferType)),
   ((1400 - sizeof(CommHeaderType)) / sizeof(EventClass) ) * sizeof(EventClass),
   320,                                      // # entries in Global Queue (原160, 翻倍)
   128,                                      // # entries in Private Queues (原32, 4倍)
   VIRGIN_SOCKET,
   IPXGlobalConnClass::COMMAND_AND_CONQUER0);
```
 
#### QUEUE.CPP
 
**old**:
```cpp
//------------------------------------------------------------------------
// Determine how many events it's OK to send this frame.
//------------------------------------------------------------------------
if (net->Private_Num_Send() >= 4) {
   cap = 0;
   do_once = 1;
}
else if (net->Private_Num_Send() >= 2) {
   cap = 5;
   do_once = 1;
}
```
 
**new**:
```cpp
if (net->Private_Num_Send() >= 16) {
   cap = 0;
   do_once = 1;
}
else if (net->Private_Num_Send() >= 8) {
   cap = 20;
   do_once = 1;
}
```

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...