From 8cb74178c2b8e5883a1181af687fa8cfc0c6e5da Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 18 Nov 2018 23:44:40 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95=E4=B8=BA=E5=B0=8F?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Net/je_socket.h | 144 --------------------------------------------- 1 file changed, 144 deletions(-) delete mode 100644 src/libjin/Net/je_socket.h (limited to 'src/libjin/Net/je_socket.h') diff --git a/src/libjin/Net/je_socket.h b/src/libjin/Net/je_socket.h deleted file mode 100644 index eb01719..0000000 --- a/src/libjin/Net/je_socket.h +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef __JE_NET_SOCKET_H__ -#define __JE_NET_SOCKET_H__ -#include "../core/je_configuration.h" -#if defined(jin_net) - -#include "tekcos/tekcos.h" - -namespace JinEngine -{ - 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 jin_net == jin_net_tekcos - - /// - /// - /// - Socket(const tk_TCPsocket& tcpHandle); - - /// - /// - /// - Socket(const tk_UDPsocket& udpHandle); - - /// - /// - /// - union - { - tk_TCPsocket tcpHandle; - tk_UDPsocket udpHandle; - } mHandle; - #endif - - /// - /// - /// - SocketType mType; - - }; - - } // namespace Net -} // namespace JinEngine - -#endif // defined(jin_net) - -#endif // __JE_NET_SOCKET_H__ \ No newline at end of file -- cgit v1.1-26-g67d0