diff options
Diffstat (limited to 'src/thrd/thrd.cpp')
| -rwxr-xr-x | src/thrd/thrd.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/thrd/thrd.cpp b/src/thrd/thrd.cpp new file mode 100755 index 0000000..63135a8 --- /dev/null +++ b/src/thrd/thrd.cpp @@ -0,0 +1,26 @@ +#ifndef THRD_CPP +#define THRD_CPP + +#include "thrd.h" +#include <sys/socket.h> + +using namespace std; + +thrd::thrd( int i_sock ) +{ + this->i_sock = i_sock; +} + +thrd::~thrd() +{ + shutdown ( get_sock() , 2 ); + close ( get_sock() ); +} + +void +thrd::run() +{ + wrap::SOCK->read_write( this, i_sock ); +} + +#endif |
