Commit 2fc4d581 authored by Guido van Rossum's avatar Guido van Rossum

Added debug statements to report data actually sent and received on

the socket.
parent b1908846
......@@ -188,6 +188,7 @@ class Telnet:
"""
if IAC in buffer:
buffer = string.replace(buffer, IAC, IAC+IAC)
self.msg("send %s", `buffer`)
self.sock.send(buffer)
def read_until(self, match, timeout=None):
......@@ -365,6 +366,7 @@ class Telnet:
# The buffer size should be fairly small so as to avoid quadratic
# behavior in process_rawq() above
buf = self.sock.recv(50)
self.msg("recv %s", `buf`)
self.eof = (not buf)
self.rawq = self.rawq + buf
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment