-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle admin port version 4 (#21)
* feat: Get admin port version currently do nothing with ti * feat: remove shares * fix: build errors * feat: Company update message also cannot go out of bounds * fix: remove code relying on removed code * fix: tests --------- Co-authored-by: Damian Laczak <shoter@users.noreply.github.com>
- Loading branch information
Showing
12 changed files
with
83 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Collections.Generic; | ||
|
||
using Akka.Actor; | ||
|
||
using OpenTTDAdminPort.Game; | ||
using OpenTTDAdminPort.MainActor.Messages; | ||
|
||
namespace OpenTTDAdminPort.MainActor.StateData | ||
{ | ||
public class ConnectingData : IMainData | ||
/// <summary> | ||
/// Initiator of connect process to which we will send a message informing about successfull connect | ||
/// </summary> | ||
public record ConnectingData( | ||
IActorRef TcpClient, | ||
IActorRef Initiator, | ||
ServerInfo ServerInfo, | ||
string ClientName, | ||
IReadOnlyDictionary<AdminUpdateType, AdminUpdateSetting>? AdminUpdateSettings, | ||
AdminServerInfo? AdminServerInfo, | ||
Guid UniqueConnectingIdentifier, | ||
byte? AdminPortNetworkVersion) : IMainData | ||
{ | ||
public IActorRef TcpClient { get; } | ||
|
||
/// <summary> | ||
/// Initiator of connect process to which we will send a message informing about successfull connect | ||
/// </summary> | ||
public IActorRef Initiator { get; } | ||
|
||
public ServerInfo ServerInfo { get; } | ||
|
||
public string ClientName { get; } | ||
|
||
public Dictionary<AdminUpdateType, AdminUpdateSetting> AdminUpdateSettings { get; } = new(); | ||
|
||
public AdminServerInfo? AdminServerInfo { get; set; } | ||
|
||
public Guid UniqueConnectingIdentifier { get; } = Guid.NewGuid(); | ||
|
||
public ConnectingData(IActorRef tcpClient, IActorRef initiator, ServerInfo serverInfo, string clientName) | ||
public ConnectingData( | ||
IActorRef tcpClient, | ||
IActorRef initiator, | ||
ServerInfo serverInfo, | ||
string clientName) | ||
: this( | ||
tcpClient, | ||
initiator, | ||
serverInfo, | ||
clientName, | ||
null, | ||
null, | ||
Guid.NewGuid(), | ||
null | ||
) | ||
{ | ||
this.TcpClient = tcpClient; | ||
this.Initiator = initiator; | ||
this.ServerInfo = serverInfo; | ||
this.ClientName = clientName; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters