Consider the class udp_socket_t
.
1.1
There is a comment that implies that the interface and the implementation is not complete. What is missing there?
1.2
C++ constructors don't allow returning errors. How would you avoid having to check that the socket is valid using the udp_socket_t::is_valid()
function and rather signal immediately that the construction failed, without using exceptions?
Hint: would a static function that returns an instance of udp_socket_t
help?
Consider the class reactor_t
.
As you can see, the implementation file is empty. Implement the class according to the specification in the header file.