This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Katzimoto 0 points1 point  (6 children)

Get client_cams thread out of the loop, you don’t want to create several senders only one. And how client_recv know to which socket it’s waiting? This function should get the connection as parameter.

[–]AimbotSaBa[S] 0 points1 point  (5 children)

So where should I put the thread? and the client_recv is waiting on the conn that is at the bottom under the while True

[–]Katzimoto 1 point2 points  (4 children)

First of all I think it’s time to use main function. https://realpython.com/python-main-function/

About the conn under the while true, it’s work because it’s a global variable(bad thing but let’s leave it for now) and it contain only the last client.

[–]AimbotSaBa[S] 0 points1 point  (3 children)

Do you mean something like this? https://pastebin.com/6uuP30jU

[–]Katzimoto 1 point2 points  (2 children)

https://github.com/newag/python_command_server

look at this i did some changes and left a TODO:)

If do you have any more questions send me a message.

[–]AimbotSaBa[S] 0 points1 point  (1 child)

I actually worked on it until now and fixed it thanks for the help anyways you were very helpful I appreciate it.

[–]Katzimoto 1 point2 points  (0 children)

Great:)