]> git.tdb.fi Git - libs/net.git/blobdiff - source/http/client.h
Use nullptr instead of 0 for pointers
[libs/net.git] / source / http / client.h
index ebb73216a4eacfbbdfce4cc511e86f1e771395ef..2012498e67c79d5b6d86772993c3af48a64f169a 100644 (file)
 namespace Msp {
 namespace Http {
 
-class client_busy: public std::logic_error
-{
-public:
-       client_busy(): std::logic_error(std::string()) { }
-       virtual ~client_busy() throw() { }
-};
-
 class Request;
 class Response;
 
@@ -37,20 +30,19 @@ private:
                void resolve_failed(unsigned, const std::exception &);
        };
 
-       Net::StreamSocket *sock;
-       IO::EventDispatcher *event_disp;
-       Net::Resolver *resolver;
-       ResolveListener *resolve_listener;
-       unsigned resolve_tag;
-       std::string user_agent;
-       Request *request;
-       Response *response;
+       Net::StreamSocket *sock = nullptr;
+       IO::EventDispatcher *event_disp = nullptr;
+       Net::Resolver *resolver = nullptr;
+       ResolveListener *resolve_listener = nullptr;
+       unsigned resolve_tag = 0;
+       std::string user_agent = "libmspnet/1.0";
+       Request *request = nullptr;
+       Response *response = nullptr;
        std::string in_buf;
 
        Client(const Client &);
        Client &operator=(const Client &);
 public:
-       Client();
        ~Client();
 
        void use_event_dispatcher(IO::EventDispatcher *);