Added debug statements to report data actually sent and received on
the socket.
This commit is contained in:
parent
b1908846af
commit
2fc4d581ba
|
@ -188,6 +188,7 @@ class Telnet:
|
||||||
"""
|
"""
|
||||||
if IAC in buffer:
|
if IAC in buffer:
|
||||||
buffer = string.replace(buffer, IAC, IAC+IAC)
|
buffer = string.replace(buffer, IAC, IAC+IAC)
|
||||||
|
self.msg("send %s", `buffer`)
|
||||||
self.sock.send(buffer)
|
self.sock.send(buffer)
|
||||||
|
|
||||||
def read_until(self, match, timeout=None):
|
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
|
# The buffer size should be fairly small so as to avoid quadratic
|
||||||
# behavior in process_rawq() above
|
# behavior in process_rawq() above
|
||||||
buf = self.sock.recv(50)
|
buf = self.sock.recv(50)
|
||||||
|
self.msg("recv %s", `buf`)
|
||||||
self.eof = (not buf)
|
self.eof = (not buf)
|
||||||
self.rawq = self.rawq + buf
|
self.rawq = self.rawq + buf
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue