Commit graph

7 commits

Author SHA1 Message Date
Ty Conner
c09bea0358
Adjust connection flow (#3974)
* Adjust connection flow

Changed connection flow to better match retail PCAPs

* Update NetworkSession.cs

* endpoint split

* Update NetworkSession.cs

* Update NetworkSession.cs

* Update DeveloperCommands.cs

* Update DeveloperCommands.cs

* Update NetworkSession.cs

* Update NetworkSession.cs

* Update SessionConnectionData.cs

* Update NetworkSession.cs

* Update DeveloperCommands.cs

* Update NetworkSession.cs

* Update ConnectionListener.cs

* Update ConnectionListener.cs
2023-06-09 12:33:04 -04:00
Mag-nus
1b0043a691
NetworkSession.cachedPackets pruning (#1981)
* cachedPacketRetentionTime

* Remove the redundant SessionConnectionData.ServerTime

* Fix ushort wrapping

* 60 -> 120
2019-06-10 05:42:04 -05:00
fartwhif
10498076d0 network stability (#1511)
* fixed bug causing disconnects due to NAK requests being dropped.
added asynchronous verification of encrypted CRCs
added checksum caching to ClientPacket
removed "generational ISAAC" debugging tools
fixed a bug causing session to enter an unspecified state when the connect request packet sent to the client was corrupted in transit
added handling of trusted packet with ClientSentNetErrorDisconnect flag
fixed bug during handshake causing defunct session to linger
fixed AccountSelectCallback was being called in both the try and catch sections of a try/catch block leading to crashes whenever a bad handshake occurs
implemented parsing of optional "flow" header data
added more network logging

* added packetLog to WorldManager
removed pre-processor definition NETDIAG and directives
2019-03-10 17:40:23 -04:00
fartwhif
edd269bcbf fixing: some clients unable to connect via WAN (#1122)
* it allows clients to connect from behind a specific rare firewall configuration
not sure which of these hacks is/are needed

* fixed a connection issue for some client firewalls guarding clients connecting over WAN by changing port strategy from two unidirectional ports to a single bidirectional port with the exception of the connect response packet
bolstered security by using random initialization vectors for the CRC stream ciphers instead of a constant and known IV
changed to using a random cookie for the three-way handshake, this adds a certain effectiveness of DoS attack, but is needed for the single bidirectional port strategy

* test for correct listener

* revert some minor changes
documentation changes

* check for same IP Address

* removed dependency of Physics.Common.Random from network code
using bare System.Random constructor without locking since the network processor is single threaded
documentation

* moved CICMDCommand conditional to listener 1 path
documentation

* use sessionLock for iteration of sessionMap
consolidate ban TO-DO comments

* minor log change

* curate usings
documentation
2018-12-09 13:13:34 -06:00
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
Mag-nus
32c70b7c1e
Centralize ACE Timers (#1030)
* Reimplementation of Timers class.

This centralizes all the timers in ACE to ACE.Server.Entity.Timers.

* Session Tick comment cleanup

* Sessions no longer maintain their own ServerTime

WorldManager.UpdateWorld was sending each ticks ElapsedTime to sessions. Sessions would add this to their own ServerTime value.

This is not needed. The only time Sessions reference this value is from within their TickInParallel functions, which are called from WorldManager.Update.

For now, we just point the existing variable that was being used (SessionConnectionData.ServerTime) to Timers.PortalYearTicks.

I suspect we thought this value might need thread safety at some point which is why we might have had each session maintain their own value.

* DerethDateTime UTCNowToLoreTime to UtcNowToLoreTime
2018-09-28 16:12:10 -05:00
Mag-nus
7e256a7fb3
ACE prj to ACE.Server rename (#628)
* ACE.DatLoader renames PositionNew to Position

* Remove comment

* ACE.DatLoader DatDatabase I prefer this type instead.

* Unused references removed

* namespace fixes

* ACE prj to ACE.Server rename

* Appveyor fix I think

* Changelog

* appveyor fixes

* Update AccountTests.cs

* Update ConstructedStatementTests.cs

* Update WeenieSearchTests.cs

* ACE.Tests -> ACE.Server.Tests

* Appvyeor
2018-02-08 17:05:02 -06:00
Renamed from Source/ACE/Network/SessionConnectionData.cs (Browse further)