#include "sock.hpp" /* Client class - Defines a TCP/UDP client. - The constructor takes in a **remote** address and port, and connects the client to that address/port. */ class Client : public Sock { private: void create_socket() { Sock::create_socket(); this->sock_fd = create_remote(this->ip_ver, this->protocol, this->address.data(), this->port, dest); if (sock_fd < 0) { if (sock_fd * -1 == ECONNREFUSED) { throw EXCEPT_CONNREFUSED; } } } public: Client() {} Client(int ip_ver, char protocol, const char* address, int port) : Sock(ip_ver, protocol, address, port) {} /* TODO - Add comments to better explain the inheritance and polymorphism going on */ };