| 421 | } |
| 422 | |
| 423 | bool Socket::HasData() |
| 424 | { |
| 425 | const auto sock = m_sock.load( std::memory_order_relaxed ); |
| 426 | if( m_bufLeft > 0 ) return true; |
| 427 | |
| 428 | struct pollfd fd; |
| 429 | fd.fd = (socket_t)sock; |
| 430 | fd.events = POLLIN; |
| 431 | |
| 432 | return poll( &fd, 1, 0 ) > 0; |
| 433 | } |
| 434 | |
| 435 | bool Socket::IsValid() const |
| 436 | { |
no test coverage detected