diff options
Diffstat (limited to 'src/libjin/Net')
-rw-r--r-- | src/libjin/Net/Socket.cpp | 2 | ||||
-rw-r--r-- | src/libjin/Net/Socket.h | 2 | ||||
-rw-r--r-- | src/libjin/Net/net.cpp | 24 | ||||
-rw-r--r-- | src/libjin/Net/net.h | 30 |
4 files changed, 56 insertions, 2 deletions
diff --git a/src/libjin/Net/Socket.cpp b/src/libjin/Net/Socket.cpp index b7c621e..7e6fa7d 100644 --- a/src/libjin/Net/Socket.cpp +++ b/src/libjin/Net/Socket.cpp @@ -5,7 +5,7 @@ namespace jin namespace net { - Socket::Socket(SocketInformation info) + Socket::Socket(const SocketInformation& info) : tcpHandle(nullptr) , udpHandle(nullptr) { diff --git a/src/libjin/Net/Socket.h b/src/libjin/Net/Socket.h index fae6bd2..eb00605 100644 --- a/src/libjin/Net/Socket.h +++ b/src/libjin/Net/Socket.h @@ -26,7 +26,7 @@ namespace net class Socket { public: - Socket(SocketInformation socketInformation); + 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); diff --git a/src/libjin/Net/net.cpp b/src/libjin/Net/net.cpp new file mode 100644 index 0000000..db39be7 --- /dev/null +++ b/src/libjin/Net/net.cpp @@ -0,0 +1,24 @@ +#include "Net.h" + +namespace jin +{ +namespace net +{ + + bool Net::initSystem(const SettingBase* setting) + { + #ifdef _WIN32 + #if JIN_NET_TEKCOS + tk_init(); + #endif + #endif + return true; + } + + void Net::quitSystem() + { + + } + +} +} diff --git a/src/libjin/Net/net.h b/src/libjin/Net/net.h new file mode 100644 index 0000000..54ffede --- /dev/null +++ b/src/libjin/Net/net.h @@ -0,0 +1,30 @@ +#ifndef __JIN_NET_H +#define __JIN_NET_H +#include "../modules.h" +#if JIN_MODULES_NET + +#include "../Common/Subsystem.hpp" +#include "Socket.h" + +namespace jin +{ +namespace net +{ + + class Net : public Subsystem<Net> + { + public: + + protected: + Net() {}; + ~Net() {}; + SINGLETON(Net); + bool initSystem(const SettingBase* setting) override; + void quitSystem() override; + }; + +} +} + +#endif // JIN_MODULES_NET +#endif // __JIN_NET_H
\ No newline at end of file |