telnet --- sockets ?
maximilianscherr
MaximilianScherr at T-Online.de
Tue Jan 22 16:19:49 EST 2002
it's very stange:
server is sending a string about 20 to 80 chars in brackets[]
with s infront of it, if the server gets a sring "sservinfo"(newline
terminated).
i got different codes:
with telnetlib:
...thewholeconnstuff
s.write("sservinfo\n")
res = s.read_until("]")
print res
output: the string that should be send, so -> WORKS
with socket:
...thewholeconnstuff
s.send("sservinfo\n")
res = s.recv(128)
print res
output: no output, it hangs!, so -> DOESN'T WORK
now can anybody tell me why?
i also tried lower buff numbers
More information about the Python-list
mailing list