Refactoring of exception handling. Start of datagram_socket class. More stream_socket testing.