Hello Everyone,
I am qurrently working on a TCP-Client, which needs to become command Based.
I have already "prepared" a protocol to this purpose, by sending a command-ID with each data package, which the server can base its response on.
My current problem lies on the fact that i will have many objects sending commands to the server and in some cases they will expect a response.
Now I am unsure how to organize this best specially without blocking the socket.
Should I use Threads for each sender that expects a response?
or
Should I try to implement a ticketing of sorts? For which each command sent will get a number and this will need to be attached to the corresponding response... (sounds complicated! )
or
???
I'm looking for some insight or a nudge in the "right" direction.
(Hope someone understands what i have tried to ask....)
Thanks
Eric
Bookmarks