Skip to content

Instantly share code, notes, and snippets.

@ceffiong
Created February 13, 2020 16:06
Show Gist options
  • Save ceffiong/4976708e0791cfc959953743e4650b5e to your computer and use it in GitHub Desktop.
Save ceffiong/4976708e0791cfc959953743e4650b5e to your computer and use it in GitHub Desktop.
Multi-user Group Chat Server function to accept clients
### several lines of codes ommitted
### See https://gist.github.com/effiongcharles/290854dba0f1bea7a609138cd9efcd65.js for preceeing codes
def accept_clients(the_server, y):
while True:
client, addr = the_server.accept()
clients.append(client)
# use a thread so as not to clog the gui thread
threading._start_new_thread(send_receive_client_message, (client, addr))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment