1

In my C++ application I'm using network connection (TCP). when I'm identify a network connection error I'm trying to connect to another interface. in the reconnection the connect function has passed with no error but on send function it return an SOCKET_ERROR and WSGetLastError return 10054. do you know what is the meaning of this error and what should I do to resolve it?

10x

2 Answers 2

2

10054 means connection reset by peer -- the remote endpoint replied with an RST packet to tell you that the connection isn't open. Reconnect with connect() instead of trying to simply change interfaces on your local end.

Sign up to request clarification or add additional context in comments.

2 Comments

that's what I did. I reconnect with connect function and that function passed but in senf function after it I get the error above
Does the remote peer have the socket open again yet? Are you trying to connect() to a listening socket or trying to connect to a "connected" socket on the remote peer?
0

10054 (connection reset by peer) after successfull connect() means that the server accepts incoming connection but after that it closes the accepted socket without waiting for incoming information. The only way to resolve this is to check the server application logic.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.