Exemplo n.º 1
0
 public ClientDriver(string username)
 {
     myUsername = username;
     client     = new ClientObject();
     client.Connect();
     client.Send(myUsername);
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
 private void btConnect_Click(object sender, EventArgs e)
 {
     client.Connect("127.0.0.1", 11000);
 }