×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    26

    How to determine that a socket has been flushed?

    I am working with a modified version of the sockets example that incorporates HTTP Post. The problem that I am having is determining at which point all the data has been written to the socket and socket has been flushed, so that I can close the connection to the webserver. Idealy I would like to be able to generate an event on that, instead of polling for it.

    I managed to solve a similar problem of determining when the socket connection had been established before starting the transmission by using a callback event. I just don't know at which point to add the event for the closing of the socket.

    Keep in mind that the call to write to the socket is a non-blocking call.

    Thanks,

    Shabbir

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    24

    See working example


  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    I took a look at the code but it didn't have anything that I would be able to utilize.

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    26

    Is RSocket.Write() a blocking call?

    I think I have figured out how to generate the event I need. I just need to make sure that RSocket.Write() is a blocking call or not. Anyone know?

    Thanks

  5. #5
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122
    Since RSocket::Write() takes a TRequestStatus parameter, it is an asynchronous (non-blocking) call.

    Lauri

  6. #6
    Registered User
    Join Date
    Jun 2003
    Posts
    26
    hmm... Ok, I can still use my method to see if the write has been completed. Is there a value of the TRequestStatus parameter that will tell me that Write has completed.

Posting Permissions

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