Pinging localhost [Answered]
The block below is a method that compiles without issue. However, when I try and pass it localhost:8888 it skips over the pingable = reply.Status == IPStatus.Success line into the catch. Am I passing the argument wrong or do I need a different method to handle local host?
9 Replies
it isn't a specific exception, as I haven't written one. It just returns false as that is the default value
well, try adding a
catch(Exception ex)
clause for now
see if you are getting some other exception{"An exception occurred during a Ping request."}
+ InnerException {"No such host is known"} System.Exception {System.Net.Sockets.SocketException}
there we go, and when an exception is thrown inside a try block, it jumps directly to the catch
there is no guarantee that all lines in the try runs
here is the full block
yeah, pings are ICMP commands if I'm not mistaken
as in, there is no port specified
I see. I suppose that closes this issue then. Thank you.
pls use the
/close
command to mark this thread as answered✅ This post has been marked as answered!