|
|
|
@ -76,6 +76,14 @@ def main():
|
|
|
|
|
log.info(f'Listening on {listen_fname}')
|
|
|
|
|
client_skt, _addrinfo = listen_skt.accept() # blocks
|
|
|
|
|
log.info('Incoming connection')
|
|
|
|
|
if True or ONE_CLIENT:
|
|
|
|
|
# We only support one client, so we can clean up the listening socket.
|
|
|
|
|
# TODO: We _could_ actually support multiple clients, by connect()ing to
|
|
|
|
|
# the compositor multiple times. (The code is almost ready apart from
|
|
|
|
|
# the fact that the select loop does not expect accepting connections.)
|
|
|
|
|
# However, at that point this should be probably written asynchronously…
|
|
|
|
|
listen_skt.close()
|
|
|
|
|
os.unlink(listen_fname)
|
|
|
|
|
connect_skt.connect(connect_fname)
|
|
|
|
|
log.debug(f'Succesfully connected to {connect_fname}')
|
|
|
|
|
|
|
|
|
|