Show / Hide Table of Contents

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 IPEndPoint.Any for address or 0 for port if you want to have automatically assigned values.

System.Int32 maxConnections

Maximum number of connections. 0 - for maximum possible.

Returns
Type Description
IUdpServer

IUdpServer implementation instance for this lib.

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾