mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Improve interactive latency
While typing in confetty console in blind test and confetty was using a TLS socket, the confetty console was noticably chunkier. The chunkiness could not be detected on a UNIX socket. Setting NODELAY on both sides of the socket seems to have eliminated chunkiness so that at least I can't tell confetty from ssh+ipmitool anymore.
This commit is contained in:
parent
26c95349fc
commit
d8619e76b9
@ -296,6 +296,7 @@ def connect_tls_server(serverstring):
|
||||
af, socktype, proto, cononname, sa = res
|
||||
try:
|
||||
server = socket.socket(af, socktype, proto)
|
||||
server.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||
except:
|
||||
server = None
|
||||
continue
|
||||
|
@ -133,6 +133,7 @@ def process_request(connection, request, cfm, authdata):
|
||||
def _tlshandler():
|
||||
plainsocket = socket.socket()
|
||||
plainsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
plainsocket.setsockopt(socket.SOL_SOCKET, socket.TCP_NODELAY, 1)
|
||||
srv = ssl.wrap_socket(plainsocket, keyfile="/etc/confluent/privkey.pem",
|
||||
certfile="/etc/confluent/srvcert.pem",
|
||||
ssl_version=ssl.PROTOCOL_TLSv1,
|
||||
|
Loading…
Reference in New Issue
Block a user