> Is there a way to tell the number of bytes available without > actually retrieving the data?
There is RcvdCount but due to winsock limitation, it is not always accurate. > At some point I'd like to know > if there is data available but do not want to actually remove > the data from twsocket's buffer. This is because I want to > open a remote socket and make sure it's in wsConnected state, > then I'll retrieve data and send it through the remote socket. > The idea is to skip OnDataAvailable if no data is available, > and when there is some data, connect to a remote server, skip > more OnDataAvailable until the remote socket is connected, then > actually retrieve data and send the data via remote socket. > > Or is it a bad idea to do so? Maybe use Pause/Resume ? > An alternative way is to call Receive() and allocate memory > and cache the data into memory before remote socket is available. > But is this necessary? You could receive a lot of data before the other socket is opened. This is a potential DOS attack. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be