Login  
Search All Forums
Dart Home | PowerTCP Sockets for .NET | Custom Development Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
AuthorForum: PowerTCP Sockets for .NET (Secure and Standard)
Topic: Tag Property
howiegoo

From: Marianna, FL USA
Posts: 15
Member Since: 01/09/04
posted July 26, 2004 3:22 PM

I'm using the server component to accept tcp connections and add the ip addresses to a listview. However, I can't seem to figure out how to reference a specific connection. I've seen it mentioned that you can use a listview item's tag property to reference a specific connection.
How exactly do I do that?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 26, 2004 3:56 PM

It's pretty straightforward. Tag is an object and can be anything. Just assign e.Tcp to the ListItem's tag and you should be able to use it later.

Be aware that e.Tcp will be on a different thread so you may have to do some locking to assure that it does not get access at the same time.

See the "Connection" event of any of the server sample for examples of how to access single objects from multiple threads.
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX