10035 WOULDBLOCK error
***Note***
If you are using a .NET, Java, or related IPWorks or IPWorks SSL toolkit, then in addition to the information below, you can set the DefaultTimeout property to a positive value and perform simultaneous sends by utilizing a background thread for each send. This is only possible in .NET and Java because those toolkits are thread-safe.
In the IPWorks and IPWorks SSL toolkits, winsock error 10035 means "Resource not available" or "Operation would block".
This error happens when the winsock buffer of either the client or server side become full.
Here are two situations in which you might see Winsock error 10035:
- You're trying to send a massive amount of information through the socket, so the output buffer of the system becomes full.
- You're trying to send data through the socket to the remotehost, but the remotehost input buffer is full (because its receiving data slower than you're sending it).
while (length > 0) { //this means that we have some bytes to send
try
{
ready = false;
ipport1.SetDataToSend(TextB, offset, length);
length -= ipport1.BytesSent;
tbStatus.AppendText(ipport1.BytesSent.ToString() + " bytes sent." + "\r\n");
}
catch (nsoftware.IPWorks.IPWorksException ex1)
{
if (ex1.Code == 135) //WOULDBLOCK Error
{
if (ipport1.BytesSent == 0) while (!ready) { ipport1.DoEvents(); }
length -= ipport1.BytesSent; offset += ipport1.BytesSent;
tbStatus.AppendText("Retrying Send..." + "\r\n");
}
}
}
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.