Python Forum
Make sockest keep connection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make sockest keep connection
#3
Never mind, I found out what is going on. It is not similar to that other question. What is going on is for some reason in order to get a loop to process the socket I need to pass the socket argument directly to the function that creates the loop. So by passing the socket to the Thread __init__ function and making it an attribute of the thread was not working. Instead I have to call the run function directly and pass the socket to it. But doing that wont make the thread work properly so I can't set up a thread like that. Instead I have to use _thread and call _thread.start_new_thread to call a function that creates a loop to manage the connection and pass the socket to that function.
Reply


Messages In This Thread
Make sockest keep connection - by LavaCreeperKing - May-16-2019, 08:49 PM
RE: Make sockest keep connection - by heiner55 - May-20-2019, 03:30 AM
RE: Make sockest keep connection - by LavaCreeperKing - May-20-2019, 07:56 PM
RE: Make sockest keep connection - by heiner55 - May-21-2019, 05:05 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020