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.
 
 
 
 
 
 

33 lines
882 B

using System;
using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using SocketProgram;
using System.Threading;
using TcpClientLib;
namespace ClientSocket
{
class ClientProgram
{
static void Main(string[] args)
{
string ip = "127.0.0.1";
int port = 9999;
int sleepTime = 5000;
string[] res = SocketClass.ReadTxt("../Config/client_config.txt");
if (res[2] != "")
{
ip = res[0];
port = Convert.ToInt32(res[1]);
sleepTime = Convert.ToInt32(res[2]);
}
Console.WriteLine("ip:{0},port:{1},sleeptime:{2}",ip,port,sleepTime);
TcpClientLib.TcpClient tcpClient = new TcpClientLib.TcpClient(ip, port, sleepTime);
tcpClient.Start();
}
}
}