Added default constructors; [for client] added code to throw an exception if socket creation was unsuccessful

This commit is contained in:
2024-01-31 21:00:40 -05:00
parent 2b1c217dbb
commit 95dea026d9
2 changed files with 16 additions and 2 deletions

View File

@@ -20,6 +20,8 @@ private:
}
public:
Server() {}
Server(int ip_ver, char protocol, int port) {
/* Error checking */
if (ip_ver != 4 && ip_ver != 6) {