+ """Read a line of input from the client."""
+ # a simple way of doing this
+ # return self.rfile.readline()
+
+ data = self.request.recv(1024)
+ if not data: return None
+
+ lines = data.splitlines(True)
+
+ # ugh. this totally defeats any pipelining, not that rwhois
+ # clients should be doing that.
+ if len(lines) > 1 and config.verbose:
+ print "%s discarding additional input lines: %r" \
+ % (self.client_address, lines)
+ return lines[0]
+