From f35a6e99d64f570ea1806b885e9bce8293715e00 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 21 Oct 2025 21:11:30 +0200 Subject: [PATCH] Drop Socket::getline Signed-off-by: Chris Hofstaedtler --- pdns/sstuff.hh | 27 --------------------------- 1 file changed, 27 deletions(-) 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) { -- 2.47.3