Request(const std::string &, const std::string &);
const std::string &get_method() const { return method; }
const std::string &get_path() const { return path; }
- virtual std::string str() const;
+ std::string str() const override;
static Request parse(const std::string &);
static Request from_url(const std::string &);
public:
Response(Status);
Status get_status() const { return status; }
- virtual std::string str() const;
+ std::string str() const override;
static Response parse(const std::string &);
};
SubMessage() = default;
public:
- virtual std::string str() const;
+ std::string str() const override;
static SubMessage parse(const std::string &);
};
const SockAddr &get_peer_address() const;
protected:
- virtual std::size_t do_write(const char *, std::size_t);
- virtual std::size_t do_read(char *, std::size_t);
+ std::size_t do_write(const char *, std::size_t) override;
+ std::size_t do_read(char *, std::size_t) override;
};
} // namespace Net
public:
HandshakeReceiver();
uint64_t get_hash() const { return hash; }
- virtual void receive(const Handshake &);
+ void receive(const Handshake &) override;
};
HandshakeReceiver::HandshakeReceiver():
public:
DatagramSocket(Family, int = 0);
- virtual bool connect(const SockAddr &);
- virtual bool poll_connect(const Time::TimeDelta &) { return false; }
+ bool connect(const SockAddr &) override;
+ bool poll_connect(const Time::TimeDelta &) override { return false; }
std::size_t sendto(const char *, std::size_t, const SockAddr &);
std::size_t recvfrom(char *, std::size_t, SockAddr *&);
InetAddr();
InetAddr(const SysAddr &);
- virtual InetAddr *copy() const { return new InetAddr(*this); }
+ InetAddr *copy() const override { return new InetAddr(*this); }
- virtual SysAddr to_sys() const;
+ SysAddr to_sys() const override;
- virtual Family get_family() const { return INET; }
+ Family get_family() const override { return INET; }
unsigned get_port() const { return port; }
- virtual std::string str() const;
+ std::string str() const override;
};
} // namespace Net
Inet6Addr();
Inet6Addr(const SysAddr &);
- virtual Inet6Addr *copy() const { return new Inet6Addr(*this); }
+ Inet6Addr *copy() const override { return new Inet6Addr(*this); }
- virtual SysAddr to_sys() const;
+ SysAddr to_sys() const override;
- virtual Family get_family() const { return INET6; }
+ Family get_family() const override { return INET6; }
unsigned get_port() const { return port; }
- virtual std::string str() const;
+ std::string str() const override;
};
} // namespace Net
CompoundDef(const S &);
- virtual std::string describe() const;
- virtual char *serialize(const C &, char *, char *) const;
- virtual const char *deserialize(C &, const char *, const char *) const;
+ std::string describe() const override;
+ char *serialize(const C &, char *, char *) const override;
+ const char *deserialize(C &, const char *, const char *) const override;
};
template<typename T>
PacketTypeDef(unsigned);
~PacketTypeDef();
- virtual unsigned get_class_id() const { return get_packet_class_id<P>(); }
+ unsigned get_class_id() const override { return get_packet_class_id<P>(); }
template<typename S>
void set_serializer(const S &);
const CompoundTypeDef<P> &get_compound() const { return *compound; }
- virtual std::string describe() const { return compound->describe(); }
+ std::string describe() const override { return compound->describe(); }
char *serialize(const P &, char *, char *) const;
const char *deserialize(P &, const char *, const char *) const;
- virtual const char *dispatch(ReceiverBase &, const char *, const char *) const;
+ const char *dispatch(ReceiverBase &, const char *, const char *) const override;
};
template<typename P, typename S>
IO::Pipe &get_notify_pipe() { return notify_pipe; }
private:
- virtual void main();
+ void main() override;
};
public:
virtual ClientSocket *accept() = 0;
protected:
- virtual std::size_t do_write(const char *, std::size_t);
- virtual std::size_t do_read(char *, std::size_t);
+ std::size_t do_write(const char *, std::size_t) override;
+ std::size_t do_read(char *, std::size_t) override;
};
} // namespace Net
public:
~Socket();
- virtual void set_block(bool);
- virtual void set_inherit(bool);
+ void set_block(bool) override;
+ void set_inherit(bool) override;
const IO::Handle &get_handle(IO::Mode);
- virtual const IO::Handle &get_event_handle();
+ const IO::Handle &get_event_handle() override;
/** Associates the socket with a local address. There must be no existing
users of the address. */
public:
StreamServerSocket(Family, int = 0);
- virtual void listen(const SockAddr &, unsigned = 4);
+ void listen(const SockAddr &, unsigned = 4) override;
bool is_listening() const { return listening; }
- virtual StreamSocket *accept();
+ StreamSocket *accept() override;
};
} // namespace Net
If the socket is non-blocking, this function may return before the
connection is fully established. The caller must then use either the
poll_connect function or an EventDispatcher to finish the process. */
- virtual bool connect(const SockAddr &);
+ bool connect(const SockAddr &) override;
- virtual bool poll_connect(const Time::TimeDelta &);
+ bool poll_connect(const Time::TimeDelta &) override;
private:
void on_event(IO::PollEvent);
UnixAddr(const SysAddr &);
UnixAddr(const std::string &, bool = false);
- virtual UnixAddr *copy() const { return new UnixAddr(*this); }
+ UnixAddr *copy() const override { return new UnixAddr(*this); }
- virtual SysAddr to_sys() const;
+ SysAddr to_sys() const override;
- virtual Family get_family() const { return UNIX; }
- virtual std::string str() const;
+ Family get_family() const override { return UNIX; }
+ std::string str() const override;
};
} // namespace Net