From 520f54d6219b7c625b4e07463ac393e6982ddab6 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging ychat-0.7.1 --- src/thrd/thrd.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 src/thrd/thrd.cpp (limited to 'src/thrd/thrd.cpp') 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 + +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 -- cgit v1.2.3