summaryrefslogtreecommitdiff
path: root/src/thrd/thrd.cpp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
commit520f54d6219b7c625b4e07463ac393e6982ddab6 (patch)
tree74b4483786b3842b1a0384fd33deb7483276bea1 /src/thrd/thrd.cpp
parentae4e87df37ed8904de92c7cf2f3a11128cda2a21 (diff)
tagging ychat-0.7.1ychat-0.7.1
Diffstat (limited to 'src/thrd/thrd.cpp')
-rwxr-xr-xsrc/thrd/thrd.cpp26
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