public InterNodeNetwork(CryptoProvider crypto) { NetworkClient = new UdpClient(AddressFamily.InterNetwork); CryptoProvider = crypto; Network = new List <RemoteNode>(); PacketRetryList = new List <StarNetPacket>(); PendingResponses = new List <PendingResponse>(); RetryTimer = new Timer(DoRetries); NextTransactionNumber = 0; }
public StarNetNode(SharedDatabase database, LocalSettings settings, CryptoProvider crypto, IPEndPoint endpoint) { Settings = settings; Database = database; Listener = new TcpListener(endpoint); Clients = new List <StarboundClient>(); CryptoProvider = crypto; Network = new InterNodeNetwork(this, crypto); RegisterHandlers(); NextClientId = 0; HeartbeatTimer = new Timer(DoHeartbeats); }
public InterNodeNetwork(StarNetNode node, CryptoProvider crypto) : this(node.Settings.NetworkPort, crypto) { LocalNode = node; }
public InterNodeNetwork(ushort port, CryptoProvider crypto) : this(crypto) { NetworkClient = new UdpClient(new IPEndPoint(IPAddress.Any, port)); }