You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
609 B

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();
}
}
}