Class CoreServer
Core, engine-agnostic server logic: configuration and lifecycle event dispatching.
public class CoreServer : ICoreServer
- Inheritance
-
CoreServer
- Implements
- Inherited Members
Constructors
CoreServer(IServerConfiguration, IServerEvents)
Initializes a new instance of the CoreServer class.
public CoreServer(IServerConfiguration config, IServerEvents events)
Parameters
configIServerConfigurationThe server configuration provider.
eventsIServerEventsThe server events handler.
Properties
Address
Gets the local address of the server.
public string Address { get; }
Property Value
Port
Gets the port number the server is listening on.
public ushort Port { get; }
Property Value
RemoteAddress
Gets the remote address of the server.
public string RemoteAddress { get; }
Property Value
Methods
Deinitialize()
Deinitializes the core server, releasing resources as needed.
public void Deinitialize()
Initialize(string, string)
Initializes the core server with the specified remote address and server type name.
public void Initialize(string remoteAddress, string serverTypeName)
Parameters
remoteAddressstringThe remote address to use for initialization.
serverTypeNamestringThe name of the server type.
Exceptions
- InvalidOperationException
Thrown if the server type is invalid.