Why my setting doesn't work?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a program similar to "ping".Like the example provided in
MSDN,I call setsockopt function to set SO_RCVTIMEO value for my raw
socket.And before I make a call to recvfrom,I call getsockopt to ensure that
the value ihas been correctly set,and it has.But recvfrom does not return
automatically when the specified timeout is exceeded,conversely ,it gets
stuck permanently if no packet can be received. If anyone knows why ,could
you please tell me what I should do to get the result I want?Thank you in
advance for you help.
 
You've included wsock32.lib, right? Not all MSDN samples work -- google on
more code samples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top