1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Replace select() with poll().

This commit is contained in:
Bartosz Taudul
2019-02-10 15:45:23 +01:00
parent d18c3432a4
commit c7e64bb8a8
4 changed files with 37 additions and 69 deletions
+4 -6
View File
@@ -3,8 +3,6 @@
#include <functional>
struct timeval;
namespace tracy
{
@@ -26,8 +24,8 @@ public:
int Send( const void* buf, int len );
bool Read( void* buf, int len, const timeval* tv, std::function<bool()> exitCb );
bool ReadRaw( void* buf, int len, const timeval* tv );
bool Read( void* buf, int len, int timeout, std::function<bool()> exitCb );
bool ReadRaw( void* buf, int len, int timeout );
bool HasData();
Socket( const Socket& ) = delete;
@@ -36,8 +34,8 @@ public:
Socket& operator=( Socket&& ) = delete;
private:
int RecvBuffered( void* buf, int len, const timeval* tv );
int Recv( void* buf, int len, const timeval* tv );
int RecvBuffered( void* buf, int len, int timeout );
int Recv( void* buf, int len, int timeout );
char* m_buf;
char* m_bufPtr;