Wire up the event handlers
This commit is contained in:
1 parent
a04516c470
commit
a689f2656f
11 files changed
+90
-76
No files matched your search
@@ -10,18 +10,12 @@ namespace Mistox.Server {
|
||||
public int MaxClients { get; set; } = 10; // The max players per server
|
||||
public bool Alive { get; set; } = true; // Is the server running
|
||||
|
||||
public event EventHandler onUserConnected;
|
||||
public void InvokeOnUserConnected(TcpClientConnection ConnectedUser){
|
||||
onUserConnected?.Invoke(ConnectedUser, new EventArgs());
|
||||
}
|
||||
public event EventHandler onReceived;
|
||||
public void InvokeOnReceived(dynamic DataPacket){
|
||||
onReceived?.Invoke(DataPacket, new EventArgs());
|
||||
}
|
||||
public event EventHandler onUserDisconnected;
|
||||
public void InvokeOnUserDisconnected(TcpClientConnection DisconnectedUser){
|
||||
onUserDisconnected?.Invoke(DisconnectedUser, new EventArgs());
|
||||
}
|
||||
public event Action<TcpClientConnection> onUserConnected;
|
||||
public void InvokeUserConnected( TcpClientConnection user ){ onUserConnected?.Invoke( user ); }
|
||||
public event Action<dynamic> onDataReceived;
|
||||
public void InvokeDataReceived( dynamic data ){ onDataReceived?.Invoke( data ); }
|
||||
public event Action<TcpClientConnection> onUserDisconnected;
|
||||
public void InvokeUserDisconnected( TcpClientConnection user ){ onUserDisconnected?.Invoke( user ); }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user