locked
Program execution halts at ReceiveFrom when ping is disabled on the target host. RRS feed

  • Question

  • response = SendPackets(socket, clientEndPoint, serverEndPoint, sendBuffer, pingCount);

    -->>byteCount = socket.ReceiveFrom(receiveBuffer, 256, SocketFlags.None, ref client);

    I have written a good ICMP ping application. My only and last problem is that if the machine to be pinged has a firewall installed my program ceases to execute at the above line. I need to be able to handle the exception and is wondering if anyone might no something about this. I just can not release to anyone an application that freezes when ping is disabled on the pinged machine. When this line executes my debugger actually shows blue locks on my tabs and my application freezes completely. Oh and just so everyone knows the socket.Sendto() returns code 40 indicating a success.

    Thank you!

    Sepoto

    Saturday, September 25, 2010 3:50 AM

All replies

  • I changed the buffer size on the ReceiveFrom and made it much larger. Now my program no longer crashes however my program now states that there was a reply from the host when I know that this is impossible. On to a new debugging problem.

    Sepoto.

    Monday, September 27, 2010 12:37 AM