Unix Programming - sendto invalid argument errno (22)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2004 > sendto invalid argument errno (22)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author sendto invalid argument errno (22)
David Hinkes

2004-03-19, 8:35 pm

Hey,
Newbie question: when using the C/C++ sendto(...) function, it returns
-1 and sets the errno variable to 22 (invalid argument). This happens
only the first time I attempt to send a packet. After the first send,
the sendto(...) returns normally.

Do these symptoms sound familiar to anybody?

Thanks,
Dave

<dh83@cornell.edu>


David Schwartz

2004-03-19, 8:35 pm


"David Hinkes" <dh83@cornell.edu> wrote in message
news:pan.2004.03.19.23.54.17.712491@cornell.edu...
> Hey,
> Newbie question: when using the C/C++ sendto(...) function, it returns
> -1 and sets the errno variable to 22 (invalid argument). This happens
> only the first time I attempt to send a packet. After the first send,
> the sendto(...) returns normally.
>
> Do these symptoms sound familiar to anybody?



Not to me. Can you post the shortest chunk of code that demonstrates the
problem? Presumably, one of the arguments to 'sendto' is invalid. The most
common mistake would likely be to set the length parameter wrong.

DS



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com