aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/net/je_socket.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-12 21:48:33 +0800
committerchai <chaifix@163.com>2019-01-12 21:48:33 +0800
commit8b00d67febf133e89f6a0bfabc41feed555dc4a9 (patch)
treefe48ef17c250afa40c2588300fcdb5920dba6951 /src/libjin/net/je_socket.h
parenta907c39756ef6b368d06643afa491c49a9044a8e (diff)
*去掉文件前缀je_
Diffstat (limited to 'src/libjin/net/je_socket.h')
-rw-r--r--src/libjin/net/je_socket.h146
1 files changed, 0 insertions, 146 deletions
diff --git a/src/libjin/net/je_socket.h b/src/libjin/net/je_socket.h
deleted file mode 100644
index 00e91de..0000000
--- a/src/libjin/net/je_socket.h
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef __JE_NET_SOCKET_H__
-#define __JE_NET_SOCKET_H__
-#include "../core/je_configuration.h"
-#if defined(jin_net)
-
-#include "../common/je_object.h"
-
-#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 Object
- {
- 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