public ClientDriver(string username)
 {
     myUsername = username;
     client     = new ClientObject();
     client.Connect();
     client.Send(myUsername);
 }
示例#2
0
 static void Main(string[] args)
 {
     Console.WriteLine("Введите ip адрес сервера");
     serverip = IPAddress.Parse(Console.ReadLine());
     Console.WriteLine("Введите порт сервера");
     port = int.Parse(Console.ReadLine());
     Console.Clear();
     try
     {
         try
         {
             ClientObject Client = new ClientObject();
             Client.Connect(serverip, port);
             Client.Start();
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex.Message);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
示例#3
0
 private void btConnect_Click(object sender, EventArgs e)
 {
     client.Connect("127.0.0.1", 11000);
 }