ace/Source/ACE.Server/Network/SessionConnectionData.cs
fartwhif f0717d4d23 fixing networking bugs (#1104)
* adding @netstats admin command

* trying to figure out the issue

* fixing bug causing AcknowledgeSequence packets to increment the lastReceivedFragmentSequence variable, causing the Sequence to break and never recover for that session
fixing bug causing RequestTransmit packets to be ignored
fixing bug causing the server to crash when a C2S packet is corrupt or malformed
changing the C2S RequestForTransmit packet count to be per request packet instead of per requested sequence
adding Developer commands junk, junk_s2c, junk_c2s, trash_s2c, and trash_c2s to simulate bad connections and manually corrupt packets

* updating changelog.md

* Update changelog.md

fixed incorrect variable name referred to in change log

* Update changelog.md

fix formatting

* adding preprocessor definition NETDIAG and directives to ACE.Common and ACE.Server to help development by preserving troubleshooting tools without interference with the optimal solution

* Apply suggestions from code review

set accessor only needed for NETDIAG functionality
minor change log addition

* reverting some unnecessary source syntax and formatting changes.
removing an unused exception variable

* reverting some unnecessary source syntax and formatting changes

* minor optimization of a duplicate prevention check
2018-11-30 23:58:00 -05:00

31 lines
958 B
C#

using ACE.Common.Cryptography;
using ACE.Server.Entity;
using ACE.Server.Network.Sequence;
namespace ACE.Server.Network
{
public class SessionConnectionData
{
public UIntSequence PacketSequence { get; set; }
public uint FragmentSequence { get; set; }
#if NETDIAG
public ISAAC IssacClient { get; set; }
#else
public ISAAC IssacClient { get; }
#endif
public ISAAC IssacServer { get; }
/// <summary>
/// This is just a wrapper around Timers.PortalYearTicks.<para />
/// In the future, we may want to consider removing this and referencing Timers.PortalYearTicks directly.
/// </summary>
public double ServerTime => Timers.PortalYearTicks;
public SessionConnectionData()
{
IssacClient = new ISAAC(ISAAC.ClientSeed);
IssacServer = new ISAAC(ISAAC.ServerSeed);
PacketSequence = new UIntSequence(false);
}
}
}