in reply to Re^2: TCP Socket and Serial Port
in thread TCP Socket and Serial Port
The problem remains: if you have two clients that each send a command to the uC in quick succession, how do you know which client to send what output to?
If you can answer that question, then what you are trying to do may be possible.
If not, the best you could do is serialise the communications. Ie. a) Accept one client connection; b) read its command; c) send it to the uC; d) retrieve the results; e) send them back to the client; f) disconnect that client; loop back to a.
More fundamentally, will the uC even look for a second command before it has returned all the output from the first command? If not, there is no point trying and no point in using threads.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: TCP Socket and Serial Port
by FlyingEagle (Initiate) on Jan 11, 2012 at 23:31 UTC | |
by BrowserUk (Patriarch) on Jan 12, 2012 at 02:17 UTC | |
|
Re^4: TCP Socket and Serial Port
by FlyingEagle (Initiate) on Jan 10, 2012 at 23:19 UTC |