]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Drop Socket::getline 16337/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 21 Oct 2025 19:11:30 +0000 (21:11 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 21 Oct 2025 19:17:19 +0000 (21:17 +0200)
Signed-off-by: Chris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
pdns/sstuff.hh

index 8dc21afdb41efbd883cc2da4da9679287228a38e..4a30d0ad3912977bc07c25db9106f86926d91ea9 100644 (file)
@@ -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)
   {