Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: is there any identity property for each tcp? |
33qq24q From: India Posts: 10 Member Since: 07/02/14 |
posted July 5, 2014 6:40 AM tcp id? I want to create 100 tcp and handle OnData event for them in same event. I mean I have 100 tcp object and 1 OnData event. bcz the behavior is almost same for each object. Tcp[] arrTcp = new Tcp[100]; for(int i=0; i<100; i++) { arrTcp[i] = new Tcp(); arrTcp[i].Data += tcp1_Data; } void tcp1_Data(object sender, Dart.Sockets.DataEventArgs e) { // all code are same except this part : if(tcp1) Console.WriteLine("tcp1"); if(tcp2) Console.WriteLine("tcp2"); ..... } Is there any ID for every tcp object that I know each reply is for which request in OnData event? |
Nick B (Admin) From: Utica, NY USA Posts: 619 Member Since: 05/25/10 Extra Support Options Custom Application Development |
posted July 7, 2014 9:40 AM Hello, The Tcp.Tag property may be used to specify a unique identifier for each Tcp instance. |
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |