public static void ConnectServer(object Port)
{
TcpClient client = new TcpClient();
int port = int.Parse(Port.ToString());
IPEndPoint ipend = new IPEndPoint(IPAddress.Parse(SocketInfo.serverIp),port);
try
{
ManualResetEvent mEvent = new ManualResetEvent(false);
System.Threading.Timer timer = new System.Threading.Timer(
obj =>
{
if (client.Connected)
{
mEvent.Set();