diff --git a/util/ddv_socket.cpp b/util/ddv_socket.cpp index 2835a5cf..6c5027b7 100644 --- a/util/ddv_socket.cpp +++ b/util/ddv_socket.cpp @@ -8,6 +8,14 @@ DDV::Socket::Socket(int sockNo){ Blocking = false; }//DDV::Socket basic constructor +/// Create a new disconnected base socket. This is a basic constructor for placeholder purposes. +/// A socket created like this is always disconnected and should/could be overwritten at some point. +DDV::Socket::Socket(){ + sock = -1; + Error = false; + Blocking = false; +}//DDV::Socket basic constructor + /// Close connection. The internal socket is closed and then set to -1. void DDV::Socket::close(){ #if DEBUG >= 3 diff --git a/util/ddv_socket.h b/util/ddv_socket.h index cc9421ae..298b5954 100644 --- a/util/ddv_socket.h +++ b/util/ddv_socket.h @@ -19,6 +19,7 @@ namespace DDV{ private: int sock; ///< Internally saved socket number. public: + Socket(); ///< Create a new disconnected base socket. Socket(int sockNo); ///< Create a new base socket. Socket(std::string adres, bool nonblock = false); ///< Create a new Unix Socket. bool Error; ///< Set to true if a socket error happened.