Results 1 to 3 of 3

Thread: Sockets problem...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325

    Sockets problem...

    I have I client application, this application communicates through a socket with the server. The problem I'm having is that I can't do two long time requests to the server, i.e.:
    Request n°1 : send me an image (400kb)
    While this is in execution:
    Request n°2 : send me another image (10k)

    At this point my program hangs up, because the socket is in use by the first request, but as the second request waits for an answer, it gets the answer that is for the 1st request... And it hangs...
    Any ideas how to deal with this problems?

    Thx very much.
    Xmas
    Learn, this is the Keyword...

  2. #2
    Addicted Member
    Join Date
    Feb 2002
    Location
    closed
    Posts
    196
    perhaps locking the network stream might help here. Look into threading your calls(if you are not doing this already) and lock the resonse stream using the MUTEX class or the SYNCLOCK statement - don't have any specific examples at hand but i might be able to rustle something up if you reckon this could be the way

    Cheers

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325
    Thank you, I already locked the net with the SYNCLOCK statement, but it happens the same.
    Learn, this is the Keyword...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width