GodotTicTacToe/scripts/net/Connection.cs

23 lines
534 B
C#

using System;
namespace Network {
public class Connection {
private static int IDCounter = 0;
public readonly int ID = IDCounter++;
public string Name;
public string Address;
public int Port;
public Connection(string address, int port) {
Name = "Connection-" + ID;
Address = address;
Port = port;
}
public bool Equals(Connection other) {
return other.Address == Address && other.Port == Port;
}
}
}