17 #include "connectiontcpclient.h"
20 #include "mutexguard.h"
26 #if !defined( _WIN32 ) && !defined( _WIN32_WCE )
27 # include <sys/types.h>
28 # include <sys/socket.h>
29 # include <sys/select.h>
46 const std::string& server,
int port )
52 const std::string& server,
int port )
71 if( !m_handler || m_socket >= 0 )
90 m_socket =
DNS::connect( m_server, m_port, m_logInstance );
101 m_server +
": connection refused" );
105 m_server +
": host not found" );
109 "Unknown error condition" );
129 if( m_cancel || m_socket < 0 )
135 if( !dataAvailable( timeout ) )
142 int size =
::recv( m_socket, (
unsigned char*)m_buf, m_bufsize, 0 );
144 int size =
::recv( m_socket, m_buf, m_bufsize, 0 );
148 m_totalBytesIn += size;