Untitled
public class Program { private static TcpListener _tcpListener; static void Main(string[] args) { StartServer(); Console.ReadLine(); } public static void StartServer() { IPAddress ipAddress = IPAddress.Parse("127.0.0.1"); int port = 8888; _tcpListener = new TcpListener(ipAddress, port); _tcpListener.Start(); Console.WriteLine("run."); _tcpListener.Stop(); } }
Leave a Comment