HighTechTalks DotNet Forums  

Vb.Net IPAddress.Parse Slow ?

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Vb.Net IPAddress.Parse Slow ? in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
marciocamurati
 
Posts: n/a

Default Vb.Net IPAddress.Parse Slow ? - 03-23-2006 , 10:17 AM






Hi everyone !

I use at my project the socket to make connections between Pda's and
now I make any tests to find where is the Pda that open the port to
receive the connection, I try the IPAddress.Parse but for my surprise
it's very slow to response, at my other test I resolve the DNS
Dns.Resolve and it's faster then the direct parse. Before make this
tests I wait that the Parse was be more and more faster than resolve
the DNS. My tests are correct, the parse at the VB.Net CF is very slow
?

Code:
{Parse} .... Dim hostAdd As IPAddress = IPAddress.Parse("10.0.0." & ipRangeAtual) ....

Code:
{Resolve} .... hostEntry = Dns.Resolve(tempHost) hostAdd = hostEntry.AddressList(0) ....

Code:
{Other} If Not hostAdd Is Nothing Then Dim ipHost As IPEndPoint = New IPEndPoint(hostAdd, porta) Dim socket As Socket Try socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, Sockets.ProtocolType.Tcp) Dim lingerOption As LingerOption = New LingerOption(True, 1) socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, lingerOption) Catch ex As Exception status = False End Try


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.