From 2497ca1dfab3062059ef70612a7655733c4f6b27 Mon Sep 17 00:00:00 2001 From: TwinFan Date: Wed, 31 Jan 2024 00:17:40 +0100 Subject: [PATCH] Fix/Networking: Removed non-working constructors --- src/Network.cpp | 9 --------- src/Network.h | 13 +------------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Network.cpp b/src/Network.cpp index f6cf52b..add7743 100755 --- a/src/Network.cpp +++ b/src/Network.cpp @@ -362,15 +362,6 @@ std::runtime_error(w), fullWhat(w) fullWhat += errTxt; } -SocketNetworking::SocketNetworking(const std::string& _addr, int _port, - size_t _bufSize, unsigned _timeOut_ms, - bool _bBroadcast) : -f_port(_port), f_addr(_addr) -{ - // open the socket - Open(_addr, _port, _bufSize, _timeOut_ms, _bBroadcast); -} - // cleanup: make sure the socket is closed and all memory cleanup up SocketNetworking::~SocketNetworking() { diff --git a/src/Network.h b/src/Network.h index 4ac881a..5e7325e 100755 --- a/src/Network.h +++ b/src/Network.h @@ -123,9 +123,6 @@ class SocketNetworking public: /// Default constructor is not doing anything SocketNetworking() {} - /// Constructor creates a socket and binds it to the given address - SocketNetworking(const std::string& _addr, int _port, size_t _bufSize = 512, - unsigned _timeOut_ms = 0, bool _bBroadcast = false); /// Destructor makes sure the socket is closed virtual ~SocketNetworking(); @@ -201,11 +198,7 @@ class UDPReceiver : public SocketNetworking public: /// Default constructor is not doing anything UDPReceiver() : SocketNetworking() {} - /// Constructor creates a socket and binds it to the given address - UDPReceiver(const std::string& _addr, int _port, size_t _bufSize = 512, - unsigned _timeOut_ms = 0) : - SocketNetworking(_addr,_port,_bufSize,_timeOut_ms) {} - + protected: /// Sets flags to AI_PASSIVE, AF_INET, SOCK_DGRAM, IPPROTO_UDP void GetAddrHints (struct addrinfo& hints) override; @@ -299,10 +292,6 @@ class TCPConnection : public SocketNetworking public: /// Default constructor is not doing anything TCPConnection() : SocketNetworking() {} - /// Constructor creates a socket and binds it to the given address - TCPConnection(const std::string& _addr, int _port, size_t _bufSize = 512, - unsigned _timeOut_ms = 0) : - SocketNetworking(_addr,_port,_bufSize,_timeOut_ms) {} void Close() override; ///< also close session connection void CloseListenerOnly(); ///< only closes the listening socket, but not a connected session