diff options
Diffstat (limited to 'src/libjin/Net')
-rw-r--r-- | src/libjin/Net/Net.cpp | 2 | ||||
-rw-r--r-- | src/libjin/Net/Net.h | 10 | ||||
-rw-r--r-- | src/libjin/Net/Socket.cpp | 22 | ||||
-rw-r--r-- | src/libjin/Net/Socket.h | 12 | ||||
-rw-r--r-- | src/libjin/Net/net.cpp | 2 | ||||
-rw-r--r-- | src/libjin/Net/net.h | 10 |
6 files changed, 29 insertions, 29 deletions
diff --git a/src/libjin/Net/Net.cpp b/src/libjin/Net/Net.cpp index 511de1a..e6c3d98 100644 --- a/src/libjin/Net/Net.cpp +++ b/src/libjin/Net/Net.cpp @@ -8,7 +8,7 @@ namespace net bool Net::initSystem(const SettingBase* setting) { #ifdef _WIN32 - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_init(); #endif #endif diff --git a/src/libjin/Net/Net.h b/src/libjin/Net/Net.h index 5ca658b..4727667 100644 --- a/src/libjin/Net/Net.h +++ b/src/libjin/Net/Net.h @@ -1,7 +1,7 @@ -#ifndef __JIN_NET_H -#define __JIN_NET_H +#ifndef __LIBJIN_NET_H +#define __LIBJIN_NET_H #include "../modules.h" -#if JIN_MODULES_NET +#if LIBJIN_MODULES_NET #include "../Common/Subsystem.hpp" #include "Socket.h" @@ -27,5 +27,5 @@ namespace net } // net } // jin -#endif // JIN_MODULES_NET -#endif // __JIN_NET_H
\ No newline at end of file +#endif // LIBJIN_MODULES_NET +#endif // __LIBJIN_NET_H diff --git a/src/libjin/Net/Socket.cpp b/src/libjin/Net/Socket.cpp index dfa793d..32d160c 100644 --- a/src/libjin/Net/Socket.cpp +++ b/src/libjin/Net/Socket.cpp @@ -32,7 +32,7 @@ namespace net if (type == SocketType::TCP) { tk_IPaddress ip; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS ip.host = tk_strtohl(address); ip.port = port; handle.tcpHandle = tk_tcp_open(ip); @@ -76,7 +76,7 @@ namespace net } } -#if JIN_NET_TEKCOS +#if LIBJIN_NET_TEKCOS Socket::Socket(const tk_TCPsocket& tcphandle) { @@ -88,7 +88,7 @@ namespace net handle.udpHandle = udphandle; } -#endif // JIN_NET_TEKCOS +#endif // LIBJIN_NET_TEKCOS Socket::~Socket() { @@ -98,7 +98,7 @@ namespace net { if (type != SocketType::TCP) return; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS if (blocking) tk_tcp_blocking(&handle.tcpHandle); else @@ -111,7 +111,7 @@ namespace net if (type != SocketType::TCP) return nullptr; Socket* client; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_TCPsocket socket = tk_tcp_accept(&handle.tcpHandle); client = new Socket(socket); #endif @@ -122,7 +122,7 @@ namespace net { if (type != SocketType::TCP) return 0; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS int len; tk_tcp_recv(&handle.tcpHandle, buffer, size, &len); return len; @@ -133,7 +133,7 @@ namespace net { if (type != SocketType::TCP) return 0; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS int len; tk_tcp_send(&handle.tcpHandle, buffer, size, &len); return len; @@ -144,7 +144,7 @@ namespace net { if (type != SocketType::UDP) return; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_UDPpack pack; pack.data = buffer; pack.len = size; @@ -159,7 +159,7 @@ namespace net if (type != SocketType::UDP) return 0; int len; - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_UDPpack pack; pack.data = buffer; pack.len = size; @@ -174,13 +174,13 @@ namespace net { if (type == SocketType::TCP) { - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_tcp_close(&handle.tcpHandle); #endif } else if (type == SocketType::UDP) { - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_udp_close(&handle.udpHandle); #endif } diff --git a/src/libjin/Net/Socket.h b/src/libjin/Net/Socket.h index 5329974..1a2256c 100644 --- a/src/libjin/Net/Socket.h +++ b/src/libjin/Net/Socket.h @@ -1,7 +1,7 @@ -#ifndef __JIN_NET_SOCKET_H -#define __JIN_NET_SOCKET_H +#ifndef __LIBJIN_NET_SOCKET_H +#define __LIBJIN_NET_SOCKET_H #include "../modules.h" -#if JIN_MODULES_NET +#if LIBJIN_MODULES_NET #include "../3rdparty/tekcos/tekcos.h" @@ -42,7 +42,7 @@ namespace net void close(); protected: - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS Socket(const tk_TCPsocket& tcpHandle); Socket(const tk_UDPsocket& udpHandle); union @@ -58,5 +58,5 @@ namespace net } // net } // jin -#endif // JIN_MODULES_NET -#endif // __JIN_NET_SOCKET_H
\ No newline at end of file +#endif // LIBJIN_MODULES_NET +#endif // __LIBJIN_NET_SOCKET_H diff --git a/src/libjin/Net/net.cpp b/src/libjin/Net/net.cpp index 511de1a..e6c3d98 100644 --- a/src/libjin/Net/net.cpp +++ b/src/libjin/Net/net.cpp @@ -8,7 +8,7 @@ namespace net bool Net::initSystem(const SettingBase* setting) { #ifdef _WIN32 - #if JIN_NET_TEKCOS + #if LIBJIN_NET_TEKCOS tk_init(); #endif #endif diff --git a/src/libjin/Net/net.h b/src/libjin/Net/net.h index 5ca658b..4727667 100644 --- a/src/libjin/Net/net.h +++ b/src/libjin/Net/net.h @@ -1,7 +1,7 @@ -#ifndef __JIN_NET_H -#define __JIN_NET_H +#ifndef __LIBJIN_NET_H +#define __LIBJIN_NET_H #include "../modules.h" -#if JIN_MODULES_NET +#if LIBJIN_MODULES_NET #include "../Common/Subsystem.hpp" #include "Socket.h" @@ -27,5 +27,5 @@ namespace net } // net } // jin -#endif // JIN_MODULES_NET -#endif // __JIN_NET_H
\ No newline at end of file +#endif // LIBJIN_MODULES_NET +#endif // __LIBJIN_NET_H |