summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-07-24 16:52:24 +0200
commit6a00886804c53883d919f008f6ec47a574d86607 (patch)
tree2dbe9fdb0a0d5f068770d49a3c960d36958f27d5 /src/network
parent2017-07-21 (diff)
downloadAltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.gz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.bz2
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.lz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.xz
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.tar.zst
AltCraft-6a00886804c53883d919f008f6ec47a574d86607.zip
Diffstat (limited to '')
-rw-r--r--src/network/Network.cpp8
-rw-r--r--src/network/Network.hpp (renamed from include/network/Network.hpp)0
-rw-r--r--src/network/NetworkClient.hpp (renamed from include/network/NetworkClient.hpp)0
-rw-r--r--src/network/Packet.hpp (renamed from include/network/Packet.hpp)0
-rw-r--r--src/network/Socket.hpp (renamed from include/network/Socket.hpp)0
-rw-r--r--src/network/Stream.hpp (renamed from include/network/Stream.hpp)0
6 files changed, 6 insertions, 2 deletions
diff --git a/src/network/Network.cpp b/src/network/Network.cpp
index 91cb481..798756d 100644
--- a/src/network/Network.cpp
+++ b/src/network/Network.cpp
@@ -1,8 +1,12 @@
#include <network/Network.hpp>
Network::Network(std::string address, unsigned short port) {
- socket = new Socket(address, port);
- stream = new StreamSocket(socket);
+ try {
+ socket = new Socket(address, port);
+ stream = new StreamSocket(socket);
+ } catch (std::exception &e) {
+ LOG(FATAL)<<e.what();
+ }
}
Network::~Network() {
diff --git a/include/network/Network.hpp b/src/network/Network.hpp
index 1281289..1281289 100644
--- a/include/network/Network.hpp
+++ b/src/network/Network.hpp
diff --git a/include/network/NetworkClient.hpp b/src/network/NetworkClient.hpp
index 22b1b22..22b1b22 100644
--- a/include/network/NetworkClient.hpp
+++ b/src/network/NetworkClient.hpp
diff --git a/include/network/Packet.hpp b/src/network/Packet.hpp
index 685e3da..685e3da 100644
--- a/include/network/Packet.hpp
+++ b/src/network/Packet.hpp
diff --git a/include/network/Socket.hpp b/src/network/Socket.hpp
index 48bcad9..48bcad9 100644
--- a/include/network/Socket.hpp
+++ b/src/network/Socket.hpp
diff --git a/include/network/Stream.hpp b/src/network/Stream.hpp
index a24dfbe..a24dfbe 100644
--- a/include/network/Stream.hpp
+++ b/src/network/Stream.hpp