2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-28 05:53:12 +00:00
This commit is contained in:
2020-02-26 03:14:22 +03:00
parent 7a21f6a928
commit fde1b1d8ad
39 changed files with 1108 additions and 502 deletions

View File

@ -39,48 +39,44 @@ namespace Esyur.Net.IIP
{
public class DistributedServer : NetworkServer<DistributedConnection>, IResource
{
//[Storable]
//[ResourceProperty]
public string ip
[Attribute]
public string IP
{
get;
set;
}
//[Storable]
//[ResourceProperty]
[Attribute]
public IMembership Membership
{
get;
set;
}
[Attribute]
public EntryPoint EntryPoint
{
get;
set;
}
//[Storable]
//[ResourceProperty]
public ushort port
[Attribute]
public ushort Port
{
get;
set;
}
//[Storable]
//[ResourceProperty]
public uint timeout
[Attribute]
public uint Timeout
{
get;
set;
}
//[Storable]
//[ResourceProperty]
public uint clock
[Attribute]
public uint Clock
{
get;
set;
@ -99,12 +95,12 @@ namespace Esyur.Net.IIP
{
TCPSocket listener;
if (ip != null)
listener = new TCPSocket(new IPEndPoint(IPAddress.Parse(ip), port));
if (IP != null)
listener = new TCPSocket(new IPEndPoint(IPAddress.Parse(IP), Port));
else
listener = new TCPSocket(new IPEndPoint(IPAddress.Any, port));
listener = new TCPSocket(new IPEndPoint(IPAddress.Any, Port));
Start(listener, timeout, clock);
Start(listener, Timeout, Clock);
}
else if (trigger == ResourceTrigger.Terminate)
{