Created
June 23, 2020 19:42
-
-
Save ahmedfgad/5ca7b3612cd96412a409f49dcc232291 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| while True: | |
| try: | |
| connection, client_info = soc.accept() | |
| print("New Connection from {client_info}.".format(client_info=client_info)) | |
| socket_thread = SocketThread(connection=connection, | |
| client_info=client_info, | |
| buffer_size=1024, | |
| recv_timeout=10) | |
| socket_thread.start() | |
| except: | |
| soc.close() | |
| print("(Timeout) Socket Closed Because no Connections Received.\n") | |
| break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment