Set socket options for client

This commit is contained in:
Fierelier 2024-01-17 23:05:55 +01:00
parent 4861357b88
commit c0a36b294b
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ if defGet(os.environ,"fstream_ssl","0") == "1": useSSL = True
if defGet(os.environ,"fstream_ssl_ignoreCert","0") == "1": sslIgnoreCert = True
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
connection.setsockopt(socket.IPPROTO_TCP,socket.TCP_NODELAY,1)
connection.setsockopt(socket.IPPROTO_TCP,socket.IP_TOS,0x10) # IPTOS_LOWDELAY
unbufferedStdout = os.fdopen(sys.stdout.fileno(),"wb",0) # Make unbuffered stdout
def listToCommand(lst):