Untitled

mail@pastecode.io avatar
unknown
csharp
10 months ago
550 B
7
Indexable
Never
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