Hi, I have this code here
if (Main && List && Admin)
{
Console.WriteLine("[SERVER]" + "Waiting to connect");
TcpClient ClientList = ListServer.AcceptTcpClient();
if (ClientList.Connected)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(ListMessage + "CONECTED !");
}
NextCode();
}
}
private void NextCode()
{
//CODE
}
When you come to the line: TcpClient ClientList = ListServer.AcceptTcpClient();
. The program waits for a connection. How do I stop waiting in the background and further lines of code to perform?