Accept/Receive picks up same request a second time when responding with Binary data RRS feed

  • Question

  • Hope I'm in the right place...appreciate a referral elsewhere if not...

    I have a simple webservice that sits and listens for requests.  These requests may be for a HTML, JSON, XML, Binary (usually images), etc response.  What I have discovered is that when a Binary request is made, fulfills the request and then checks for the next request it picks up the same request, this is very consistent behavior.  This doesn't happen when the request is for HTML or XML.   Everything works fine except my service is doing double-duty.  All the response codes are good, no errors.  The client, usually a webbrowser only sees the response from the first "send", or at least it does nothing with the second.  This happens with blocking or no-blocking.  There is a minor difference in the "recvd" data and it appears to be slight corruption in the last two lines on the second time.  I've posted images below.

    I originally created the webservice with winsock tools that come with my development language and then wrote my own since I needed to bind to a specific adapter and those tools wouldn't.   I see the same behavior in both though.  Not sure what would be different about the Binary responses that would cause such behavior.

    Is this expected?  Suggestions?



    Friday, November 2, 2012 1:57 AM