Cleanup unnessisary interface classes
This commit is contained in:
1 parent
b83887cb2a
commit
46efb5bd65
8 files changed
+58
-117
No files matched your search
@@ -13,20 +13,20 @@ namespace Mistox.Server {
|
||||
public Vector3 Position { get; set; } // The ingame position of the player
|
||||
public bool Connected { get; set; } = true; // Is the connection valid
|
||||
|
||||
private readonly ServerEntity _parent;
|
||||
private readonly MistoxServer _parent;
|
||||
private readonly TcpClient _client;
|
||||
private readonly IPEndPoint _remoteAddress;
|
||||
private readonly SemaphoreSlim _sendLock = new SemaphoreSlim(1, 1);
|
||||
private readonly CancellationTokenSource _cts = new();
|
||||
|
||||
public ServerConnection( TcpClient tcpClient, ServerEntity parent, IPEndPoint remote ) {
|
||||
public ServerConnection( TcpClient tcpClient, MistoxServer parent, IPEndPoint remote ) {
|
||||
_parent = parent;
|
||||
_remoteAddress = remote;
|
||||
_client = tcpClient;
|
||||
_client.NoDelay = true;
|
||||
_client.ReceiveTimeout = _parent.ConnectionTimeoutSeconds * 1000;
|
||||
|
||||
ServerInterface.ServerInstance.InvokeUserConnected( this );
|
||||
_parent.InvokeUserConnected( this );
|
||||
// Start the receive thread
|
||||
Task.Run(ReceiveThread);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user