Interface IUdpLibrary
Interface for UDP libraries. Use this to create network lib peers.
Namespace: Eco.Shared.Networking.Udp
Assembly: Eco.Shared.dll
Syntax
public interface IUdpLibrary
Methods
CreateClient(String, UInt32, UInt32)
Create UPD client for app with appIdentifier
.
Declaration
IUdpClient CreateClient(string appIdentifier, uint protocolVersion, uint connectTimeoutMs = 3000U)
Parameters
Type | Name | Description |
---|---|---|
System.String | appIdentifier | app identifier. |
System.UInt32 | protocolVersion | version of binary protocol used between client and server. |
System.UInt32 | connectTimeoutMs | connection timeout (time before Disconnect event received with Timeout). |
Returns
Type | Description |
---|---|
IUdpClient | IUdpClient implementation instance for this lib. |
CreateServer(String, UInt32, IPEndPoint, Int32)
Create UPD server for app with appIdentifier
.
Declaration
IUdpServer CreateServer(string appIdentifier, uint protocolVersion, IPEndPoint requestedEndPoint, int maxConnections)
Parameters
Type | Name | Description |
---|---|---|
System.String | appIdentifier | App identifier. |
System.UInt32 | protocolVersion | version of binary protocol used between client and server. |
System.Net.IPEndPoint | requestedEndPoint | Request endpoint for the server. You can use |
System.Int32 | maxConnections | Maximum number of connections. |
Returns
Type | Description |
---|---|
IUdpServer | IUdpServer implementation instance for this lib. |