Ack Cut 1c (C#): a Connect's sequence says whether it repeats; the handshake alone seeds the watermark
The session records the sequence of the Connect that started its generation. A Connect repeats exactly when the session is connected and carries that sequence; anything else ends the generation, forgets the peer and accepts a new one. AcceptConnect answers both, ConnectRepeats is the predicate for servers that keep one session per peer, and AnswerRepeatedConnect is private. Server mode admits a Connect from a new endpoint and the session decides; the listener no longer compares payloads (the payload stays application evidence). CreateConnect on a session that has had a peer starts a new generation. An Accept counts only while the Connect is pending and only if it names it. The watermark is seeded by the Connect or Accept alone; reliable data before that is neither remembered, acknowledged nor delivered. The default initial sequence is random in [1, 2^31) in every options type. An ICMP connection reset no longer sets DisconnectReason: nothing ended. The interop peer flushes before it disconnects. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2e56b46656
commit
5ff1ee3222
5 changed files with 153 additions and 54 deletions
|
|
@ -45,7 +45,7 @@ namespace GameCult.Networking
|
|||
/// <summary>
|
||||
/// Gets or sets the first local packet sequence for each accepted peer.
|
||||
/// </summary>
|
||||
public uint InitialSequence { get; set; } = 100;
|
||||
public uint InitialSequence { get; set; } = CultNetRudpSession.RandomInitialSequence();
|
||||
/// <summary>
|
||||
/// Gets or sets the resend delay in milliseconds.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue