this code sometimes hang the system on recv int CLTIUReadWrite::Read( char *data, int nbytes) { int nleft, nread; char *ptr2; ptr2 = data; nleft = nbytes; while (nleft > 0) { nread = read(m_Client->Socket, ptr2, nleft); if (nread < 0) return nread; else if (nread == 0) break; nleft -= nread; ptr2 += nread; } return (nbytes - nleft); } void CLTIUReadWrite::Write( char *buff, int size) { int h = m_Client->Write(( char*)buff,false,size); printf(" \n data write %i data actual %i \n ",h,size); }
recv
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)