aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Net/Socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Net/Socket.h')
-rw-r--r--src/libjin/Net/Socket.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/libjin/Net/Socket.h b/src/libjin/Net/Socket.h
deleted file mode 100644
index 6d9e09b..0000000
--- a/src/libjin/Net/Socket.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef __JIN_NET_SOCKET_H
-#define __JIN_NET_SOCKET_H
-#include "../modules.h"
-#if JIN_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 JIN_NET_TEKCOS
- Socket(const tk_TCPsocket& tcpHandle);
- Socket(const tk_UDPsocket& udpHandle);
- union
- {
- tk_TCPsocket tcpHandle;
- tk_UDPsocket udpHandle;
- } handle;
- #endif
- SocketType type;
- };
-
-} // net
-} // jin
-
-#endif // JIN_MODULES_NET
-#endif // __JIN_NET_SOCKET_H \ No newline at end of file