| Linux Forum Index » Linux Development - Applications » recvfrom takes much time to return in ICMP... |
|
Page 1 of 1 |
|
| Author |
Message |
| Behzad... |
Posted: Fri Aug 21, 2009 6:17 am |
|
|
|
Guest
|
hi,
I have written a ping application ( by looking at (no spam) Stevens's book -
UNOP-). I works but there is aproblem with recvfrom. it wait much
longer that i expect, about 3 to 5 seconds.Is there anyway to reduce
this time or there maybe something wrong with my code?
Regards,
Behzad |
|
|
| Back to top |
|
|
|
| David Schwartz... |
Posted: Fri Aug 21, 2009 1:37 pm |
|
|
|
Guest
|
On Aug 21, 9:17 am, Behzad <sedighza... at (no spam) gmail.com> wrote:
Quote: I have written a ping application ( by looking at (no spam) Stevens's book -
UNOP-). I works but there is aproblem with recvfrom. it wait much
longer that i expect, about 3 to 5 seconds.Is there anyway to reduce
this time or there maybe something wrong with my code?
The 'recvfrom' function will wait until a packet is received. If that
takes 3 to 5 seconds, then that's how long it will wait. The only way
to reduce the time is to call 'recvfrom' later or get the other side
to send the packet sooner.
DS |
|
|
| Back to top |
|
|
|
| Ali... |
Posted: Fri Aug 21, 2009 7:59 pm |
|
|
|
Guest
|
| how can we force the other side to send it sooner? |
|
|
| Back to top |
|
|
|
| Joe Pfeiffer... |
Posted: Sat Aug 22, 2009 12:41 am |
|
|
|
Guest
|
Ali <sedighzadeh at (no spam) gmail.com> writes:
Quote: how can we force the other side to send it sooner?
Unless there is something weird going on (note my previous posts on a
device that advertises a window size of one byte), the question should
be, "why is it waiting so long?"
--
As we enjoy great advantages from the inventions of others, we should
be glad of an opportunity to serve others by any invention of ours;
and this we should do freely and generously. (Benjamin Franklin) |
|
|
| Back to top |
|
|
|
|