Jump to content

TCPRecv returns error -1


 Share

Recommended Posts

Hello All,

I'm currently trying out a TCP-connection, and sometimes I get an @error of -1 (minus one).

The help says that the error is a direct reflection of what "WSAGetError" (WSAGetlastError ?) returns, but I could not find any description for it.

I allso noticed that most, if not all WSA errors are in the 10000 -range, with "-1" falling far outside of it.

Is that "-1" maybe still an (undescribed) internal error (indicating a clean connection-termination) ?

Link to comment
Share on other sites

In that case, the answer to your initial question is: Yes, it is ment as a return value indicating a disconnection. As a disconnection is in relation to a connection a error, it is returned as such.

Thank you. That makes checking for a remote-initiated disconnect a bit easier.

Now all I need to do is to find a way to add that information to AI's Help (as its not present in there). :lmao:

Edited by BitRot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...