| Dart Home | PowerTCP Telnet for .NET | Custom Development | Reply | PowerTCP Telnet for .NET Topics | Forums |
| Author | Forum: PowerTCP Telnet for .NET Topic: BeginReceive question. |
| yaronl From: Kfar-Saba, Israel Posts: 4 Member Since: 12/19/07 |
posted December 23, 2007 11:54 AM I need to create a program that connects to various TELNET servers. I plan to create a TCLient class that wraps the TELNET component. Since I don't want to block the UI thread reading data from ALL TClents, I plan to use the BeginReceive mathod in each client. 1. Does BeginReceive opens a new thread? 2. Does EndReceive happens on the main thread? 3. Is there a better model you propose I use? |
| Amit From: Rome, NY USA Posts: 315 Member Since: 03/15/06 |
posted December 24, 2007 4:44 PM Hello, Yes, BeginReceive will open a new thread. Best Regards, Amit ------ |
| yaronl From: Kfar-Saba, Israel Posts: 4 Member Since: 12/19/07 |
posted December 25, 2007 2:02 AM My question had 3 parts. Can you refer to the other two? |
Mike Baldwin (Admin)![]() From: Rome, NY USA Posts: 114 Member Since: 04/11/00 Extra Support Options Custom Application Development |
posted December 26, 2007 3:11 PM Yes, sorry about that. 1. As Amit says, BeginReceive uses a blocking receive on a new worker thread. 2. If the Telnet.Synchronizing property is set to a UI element, then EndReceive is raised on the UI thread (this is the main thread for a Windows Form application). 3. Yes, you should use the BeginReceive/EndReceive technique to ensure the UI thread stays responsive as you poll multiple Telnet Servers. Hope this helps. Happy Holidays! |
| Reply | PowerTCP Telnet for .NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|