From 7d5f055547e70fa93ee9ac944e62f8d657b9dc55 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 19 Oct 2018 08:36:44 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Net/Socket.h | 62 ------------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 src/libjin/Net/Socket.h (limited to 'src/libjin/Net/Socket.h') diff --git a/src/libjin/Net/Socket.h b/src/libjin/Net/Socket.h deleted file mode 100644 index 04d3ab0..0000000 --- a/src/libjin/Net/Socket.h +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef __LIBJIN_NET_SOCKET_H -#define __LIBJIN_NET_SOCKET_H -#include "../configuration.h" -#if LIBJIN_MODULES_NET - -#include "../3rdparty/tekcos/tekcos.h" - -namespace jin -{ - namespace net - { - - enum SocketType - { - TCP, - UDP - }; - - struct SocketInformation - { - unsigned int address; - unsigned short port; - SocketType type; - }; - - class Socket - { - public: - Socket() {}; - Socket(const Socket& socket); - Socket(const SocketInformation& socketInformation); - Socket(SocketType type, unsigned short port); - Socket(SocketType type, unsigned int address, unsigned short port); - Socket(SocketType type, const char* address, unsigned short port); - ~Socket(); - void configureBlocking(bool bocking); - Socket* accept(); - int receive(char* buffer, int size); - int send(char* buffer, int size); - void sendTo(char* buffer, int size, unsigned int address, unsigned int port); - int receiveFrom(char* buffer, int size, unsigned int address, unsigned int port); - void close(); - - protected: - #if LIBJIN_NET_TEKCOS - Socket(const tk_TCPsocket& tcpHandle); - Socket(const tk_UDPsocket& udpHandle); - union - { - tk_TCPsocket tcpHandle; - tk_UDPsocket udpHandle; - } handle; - #endif - SocketType type; - - }; - - } // namespace net -} // namespace jin - -#endif // LIBJIN_MODULES_NET -#endif // __LIBJIN_NET_SOCKET_H -- cgit v1.1-26-g67d0