Mar-27-2021, 07:05 AM
Thank you so much for your help. I'll try to implement this idea in my code.
And yes, I am using sockets to connect my clients with the server.
I was thinking to store the elements in the client queue. THen convert the queue to a list and send it over to the socket.
Then the server will send a message after some time asking for some info. If the client has some words with it, it will respond.
Timer I am still confused, since:- If we use time.sleep(60), it just hangs the complete program.
Will it not affect the functionality?
Also, 1 more query... Can I make use of JSON to convert the entire list to bytes. if yes, then how can I send the JSON converted bytes over the socket?
send.encode() command does not work for it. It just gives the socket timeout error.
And yes, I am using sockets to connect my clients with the server.
I was thinking to store the elements in the client queue. THen convert the queue to a list and send it over to the socket.
Then the server will send a message after some time asking for some info. If the client has some words with it, it will respond.
Timer I am still confused, since:- If we use time.sleep(60), it just hangs the complete program.
Will it not affect the functionality?
Also, 1 more query... Can I make use of JSON to convert the entire list to bytes. if yes, then how can I send the JSON converted bytes over the socket?
send.encode() command does not work for it. It just gives the socket timeout error.