| 372 | } |
| 373 | |
| 374 | bool Socket::Read( void* buf, int len, int timeout ) |
| 375 | { |
| 376 | auto cbuf = (char*)buf; |
| 377 | while( len > 0 ) |
| 378 | { |
| 379 | if( !ReadImpl( cbuf, len, timeout ) ) return false; |
| 380 | } |
| 381 | return true; |
| 382 | } |
| 383 | |
| 384 | bool Socket::ReadImpl( char*& buf, int& len, int timeout ) |
| 385 | { |