Class NetworkFactory
Factory for main network components.
Implements
Namespace: Evergine.Networking.Connection
Assembly: Evergine.Networking.dll
Syntax
public class NetworkFactory : INetworkFactory
Methods
CreateNetworkClient(string, float, float)
Creates the network client.
Declaration
public INetworkClient CreateNetworkClient(string applicationIdentifier, float pingInterval, float connectionTimeout)
Parameters
Type | Name | Description |
---|---|---|
string | applicationIdentifier | The application identifier. |
float | pingInterval | The ping interval in seconds. |
float | connectionTimeout | The connection timeout in seconds. |
Returns
Type | Description |
---|---|
INetworkClient | A new network client. |
CreateNetworkServer(string, int, float, float, string)
Creates the network server.
Declaration
public INetworkServer CreateNetworkServer(string applicationIdentifier, int port, float pingInterval, float connectionTimeout, string serverName = null)
Parameters
Type | Name | Description |
---|---|---|
string | applicationIdentifier | The application identifier. |
int | port | The port. |
float | pingInterval | The ping interval in seconds. |
float | connectionTimeout | The connection timeout in seconds. |
string | serverName | The server name, which is sent in every discovery response. |
Returns
Type | Description |
---|---|
INetworkServer | A new network server. |