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: Performance Problem with Tcp.RemoteEndpoint.Address
gjeilers

From: Golden, CO USA
Posts: 4
Member Since: 07/08/04
posted July 8, 2004 7:27 PM

When executed from the Connect event handler, the following takes about 10 seconds to return:

IPAddress hostAddress = e.Tcp.RemoteEndPoint.Address;

Whereas, the following returns immediately:

IPAddress hostAddress = ((IPEndPoint)e.Tcp.Socket.RemoteEndPoint).Address;

I would have expected them to execute the same code. What's going wrong here?
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 8, 2004 7:34 PM

Both return immediately for me. What do I need to do to see what you are seeing?
gjeilers

From: Golden, CO USA
Posts: 4
Member Since: 07/08/04
posted July 9, 2004 10:25 AM

Since I posted the first message, I discovered that the time was highly dependent on what the RemoteEndPoint was. For my testing, I have been connecting from the same host as the .NET IDE is running on.

The method appears to be querying the system or dns for information, and maybe there is a local cache for it as well. The second time the call is made, it returns immediately; the first time, it takes anywhere from 1 to 10 seconds. On the first call, the .NET version, e.Tcp.Socket.RemoteEndPoint, always seems to work faster than the Dart version.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 9, 2004 10:31 AM

Ok, thanks for the info.
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX