using System; using System.IO; using System.Net; using System.Net.Sockets; using System.Text; using SocketProgram; using TcpServerLib; namespace SeverSocket { class SeverProgram { static void Main(string[] args) { int port = 9999; string[] res = SocketClass.ReadTxt("../Config/lisen_port.txt"); if (res[0] != "") { port = Convert.ToInt32(res[0]); } Console.WriteLine("listen port{0}",port); TcpServer tcpServer = new TcpServer(port); tcpServer.Listen(); } } }