Is there a maximum on the number of sends on a socket? My sends work upto about 480 sends after which it starts returning -1
I’m using visual studio 2008 vc++ and socket programming using ACE.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there’s no upper limit on the number of send()s you can call.
Check out the man page for send (or whichever page is suitable for your platform) and try using the perror() (example: ‘perror(“error sending. system said”);’) call to see which error is being generated.
Note that -1 is a generic return code in this case and could mean anything from “My socket closed” to “The argument you’re giving me is not a valid file descriptor”; thus, it’s very hard to tell what’s going on without some further information.
EDIT: The above answer assumed *NIX; this was a poor assumption.
Since you’re using ACE, look at the ACE::send() documentation (doxygen is here). Additionally, there should be an ACE_OS::perror(“error sending. system said”) call (doxygen is here) that should work similar to what I’ve described above.
HTH