Sockets recv function on a new line
Posted on 2006-11-10
I'm writing a program that receives data from a server and prints it.. but I would like to do this line by line. That is, everytime the server sends me a line, I want the line printed. I'm not sure on how to do this though, the current method is "data = fsocket.recv(1024)", however my assumption is that only reads in 1024 bytes at a time. Is it possible to have it receive one line and not wait till the 1024 bytes are filled? Thanks..