TCPtream bug

2009-09-02 Thread Vincent Chen
hi, I recently found TCPStream bug when performing TCPStream::open(). here is my code: TCPStream client; client.setTimeout(5000); //this will let connect() function be non-block while(1) { client.connect(IPV4Host, port, buffer); if(!client.isConnected()) { ::usleep(100*3); conti

Re: TCPtream bug

2009-09-02 Thread David Sugar
Probably instead, connect methods should actually do this if the so is invalid when they are called. If we do fail to connect, we should release the resource as we do now. If we decide to close/delete the object on a connect failure, then we would not be waisting resources acquiring a brand new s

URLStream timeout problem

2009-09-02 Thread Vincent Chen
hi, When I use setTimeout() to URLStream object it do not performing a non-blocking connect(). Unless I also set TCPStream::timeout be non zero. in URLStream.hpp line 403 inline void setTimeout(timeout_t to) { timeout = to; TCPStream::timeout = to; }; The timeout value in URLStream seems only w