Greetings, Developers.
This class started because I was developping a server
monitor and I needed a way to detect if the server was down or not.
So the easiest way to know is pinging the server, right?
Wrong. Well... almost.
I started searching the web and I found a code developped for C# and after
a few bumps I converted to VB .NET and the code works fine, up to the point
of performance.
I use System.Net.Sockets.Socket to
create and send a Raw packet of data to send to the host. The send part works
fine, but the response (when I lesten for the echo of the packet I just sent)
takes ages to process.
I've checked the docs on Microsoft about the System.Net.Sockets.Socket.ReceiveFrom to
see if they have some insight about what's going on, and finally found a solution - here it is!
UPDATE!
I have included an working sample of this class. Hope you like it.
Best Regards,
Paulo Silva Jr.
Comments