windows socket error 10054

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • osfreak
    New Member
    • Oct 2008
    • 22

    windows socket error 10054

    i have a client,server application... I have made the server to listen and accept a connection. The client also connects successfully

    The connection works good except that i get the WSAECONNRESET error at times.


    server works as
    {
    recv
    send
    }


    client
    {
    send
    recv
    }



    after server's send, the server's recv(supposed to block)
    fails with the error 10054



    It does not happen when small amount of data is sent..

    What could be the cause of the problem,
    Is there any restriction in size of data to be sent via a windows socket?

    p.s- There is no loss of connection between client and server (run on the same machine)
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    WSAECONNRESET is tied into how the connection to the server is set-up but you have not shown logically where you are doing the connection.

    If you drop a connection and then try to re-establish it too quickly you can get this error.

    Comment

    • osfreak
      New Member
      • Oct 2008
      • 22

      #3
      server has this code

      // Connection is made here
      while(1)
      {
      recv()
      send()
      }

      After send() , the subsequent recv() fails. with error 10054
      Though the send() call was successful client does not receive it.


      This happens after 2 or 3 interactions with the server


      The first interactions happen perfectly.

      I have not disconnected or closed the socket anywhere...

      Comment

      • osfreak
        New Member
        • Oct 2008
        • 22

        #4
        Since i forgot to free() memory allocated the server made a heap error, which failed the server and caused the message...

        Thanks everyone for ur valuable effort...

        Comment

        Working...