25 lines
990 B
C#
25 lines
990 B
C#
using System;
|
|
|
|
namespace Mistox.Client {
|
|
|
|
public class MistoxServerClient {
|
|
public string ServerName { get; set; } = ""; // The Name of the server
|
|
public bool Alive { get; set; } = true; // Is the server running
|
|
public int Port { get; set; } = 9126; // What Port to bind on
|
|
|
|
public event EventHandler onUserConnected;
|
|
public void InvokeOnUserConnected(UDPEndpoint 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(UDPEndpoint DisconnectedUser){
|
|
onUserDisconnected?.Invoke(DisconnectedUser, new EventArgs());
|
|
}
|
|
}
|
|
|
|
}
|