开发者

C++ socket's send() causes system error 10053

I'm trying to send a message from my client to my server (currently they are both running in the same process, but I don't think it matters).

The connection is established well (I can see it with "CurrPorts" - much more user friendly than TcpView). But then, when I send the message, I get the error:

"An established connection was aborted by the software in your host machine." (number 10053)

and then the connection breaks...

here is the relevant code:

bool Client::Send(void* 开发者_Go百科msg, int size)
{
    int sockId = m_socket.GetId();
    struct sockaddr_in remote = m_socket.GetRemotePoint().GetBasePoint();
    const char* buf = (const char*)msg;
    int error = send(sockId, buf, size, 0);
    //int g = GetLastError();
    //if (g != 0)
    //{
    //  g = g;
    //}
    return (error != -1);
}

Does anybody know what's going on?

thanks :)


That's WSAECONNABORTED which means that your local machine has killed the connection. Possibly a firewall issue?

  • http://search.microsoft.com/results.aspx?mkt=en-us&q=10053%20Software%20caused%20connection%20abort


I'm so stupid... :/
I have this class MySocket which I create during Accept, but in its destructor, I CLOSE the socekt.
thanks everybody :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜