static void Main(string[] args) { Console.WriteLine("Started server on " + Packet.GetIPv4Address()); listenerSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); _clients = new List <ClientData>(); IPEndPoint ip = new IPEndPoint(IPAddress.Parse(Packet.GetIPv4Address()), 4242); listenerSocket.Bind(ip); Thread listenThread = new Thread(ListenThread); listenThread.Start(); } // start server