471,318 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,318 software developers and data experts.

Could someone show me a sample how to flush the socket sending buffer? Thanks a lot.

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("ab*@abc.com\n")
s.send("12*@hbc.com\n")
......

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.

Any hints would be appreciated.

Mike

Jun 8 '07 #1
0 1496

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert A. van Ginkel | last post: by
5 posts views Thread by Luiz Vianna | last post: by
13 posts views Thread by coloradowebdev | last post: by
4 posts views Thread by Zytan | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.