using System; namespace Robust.Shared.Network { /// /// The Client version of the INetManager. /// public interface IClientNetManager : INetManager { /// /// The NetChannel of the server. /// INetChannel? ServerChannel { get; } ClientConnectionState ClientConnectState { get; } event Action ClientConnectStateChanged; /// /// The attempted connection by a client to a server failed. /// event EventHandler ConnectFailed; /// /// Attempts to connect to the remote server. This does not Restart() the client networking. Make sure /// to Initialize(true) networking before calling this. /// /// The IP address of the remote server. /// The port the server is listening on. /// /// The user name to request from the server. /// The server is in no way obliged to actually give this username to the client. /// It's more a "I'd prefer this" kinda deal. /// void ClientConnect(string host, int port, string userNameRequest); /// /// Disconnects from the server. This does not Restart() the client networking. Make sure /// to Initialize(true) networking before calling this. /// Also cancels in-progress connection attempts. /// /// The reason why disconnect was called. void ClientDisconnect(string reason); } }