From: Chris Hofstaedtler Date: Tue, 21 Oct 2025 19:11:30 +0000 (+0200) Subject: Drop Socket::getline X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16337%2Fhead;p=thirdparty%2Fpdns.git Drop Socket::getline Signed-off-by: Chris Hofstaedtler --- diff --git a/pdns/sstuff.hh b/pdns/sstuff.hh index 8dc21afdb4..4a30d0ad39 100644 --- a/pdns/sstuff.hh +++ b/pdns/sstuff.hh @@ -328,33 +328,6 @@ public: } } - //! reads one character from the socket - [[nodiscard]] int getChar() const - { - char character{}; - - ssize_t res = ::recv(d_socket, &character, 1, 0); - if (res == 0) { - return character; - } - return -1; - } - - void getline(string& data) const - { - data.clear(); - while (true) { - int character = getChar(); - if (character == -1) { - break; - } - data += (char)character; - if (character == '\n') { - break; - } - } - } - //! Reads a block of data from the socket to a string void read(string& data) {