>>> OK, maybe on some wrong configuration (BTW if you provide IP, there
should 
>>> be no resolving, isn't it?). But it doesn't changes the note about
exception 
>>> and IP, right?
>>>   
>> If you mean the IPAddress.Parse call that was added some time ago on a 
>> user request. ( i will see if i can find the message )
>
>No, I'm talking about the fact, that the try-catch block with Parse is 
>redundant (the Parse is redundant). If the Get... fails also the Parse 
>should fail.

Thats true, GetHostEntry() should have IPAddress.Parse() built-in ;D
So if GetHostEntry() fails IPAddress.Parse() should fail too.
(But when you search at http://forums.microsoft.com it seems that
GetHostEntry() does not always work as expected)

I also think that there is some network misconfiguration in the network in
the company i am working. Seems to have something to do with the damn
windows-hostnames.

What i do not understand: If i give GetHostEntry() an IP-Address, what the
heck is this function doing for up to 30 seconds ? Does it first think the
ip-address is a hostname ?
Thats why i recommended to change the order...

IPAddress.Parse() just checks if the string looks like an IP-Address and if
it does it converts it to an "IPAddress", if it does not it throws an
exception.
So if IPAddress.Parse() sees an IP-Address i do not have to deal with the
damn (in my office very slow) windows-hostname resolving ;D
If IPAddress.Parse() fails then GetHostEntry() can try its luck.
In my tests IPAddress.Parse() parses the string very fast and the function
call is not noticeable if you let it parse a hostname.


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to