Exemple #1
0
 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;
 }
Exemple #2
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);
 }
Exemple #3
0
 public InterNodeNetwork(StarNetNode node, CryptoProvider crypto) : this(node.Settings.NetworkPort, crypto)
 {
     LocalNode = node;
 }
Exemple #4
0
 public InterNodeNetwork(ushort port, CryptoProvider crypto) : this(crypto)
 {
     NetworkClient = new UdpClient(new IPEndPoint(IPAddress.Any, port));
 }