mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Added debug statements to report data actually sent and received on
the socket.
This commit is contained in:
parent
b1908846af
commit
2fc4d581ba
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue