On Fri, 08 Jun 2007 15:36:30 -0700, mike <[EMAIL PROTECTED]> wrote: >I have called the setsockopt() to set no delay after connecting like >this way: > > s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) > s.connect(('192.168.10.1', 21980)) > s.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 0) > s.send("[EMAIL PROTECTED]") > s.send("[EMAIL PROTECTED]") > ...... > >but still, the server can only receive the first line, and keep >waiting for the second line. So, in my mind the second line is still >in the sending buffer, and not reach the server side.
There is no buffer you can flush. Also, you forgot to check the return value of the send method. It is important. You might want to look at the sendall method. Or you might want to check out Twisted. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list