I have written a simple TCP client/server.  I would like to change the TCP 
receive buffer on the server side, to see performance differences.  I am 
trying



err = sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 4096)



but that doesn't seem to actual change the buffer size.



The code is:



#Create a socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)



#Ensure that you can restart your server quickly when it terminates

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)



#Set the Recieve Buffer Size

err = sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 4096)



print socket.SO_RCVBUF

#Set the client socket's TCP port number

sock.bind(('', portno))



Development is being done a Gentoo Linux box.



Any suggestions would be great!



-Thanks





-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to