Question Tcp server client communication multiple responses

ThomasBMV

New member
Joined
Jan 6, 2011
Messages
1
Programming Experience
3-5
Hi,

i need to write an application that communicates with an MES system based on TCP server client. My app would act as server. The requested communication flow is like this.

1) Server is waiting for client
2) Client connects with data
3) Server acknowledges reception of the data
4) Server processes data
5) Server responds with processed data

I have found tons of examples (mostly based on the same code) of tcp-server-client communication. But every example only responds once to the clients call. My app needs to respond with an acknowledge string (immediately) and with processed data (could be 5 seconds later). Is this possible or am i missing something?

I hope anyone can help me
 
Yes, you can send data multiple times without closing the connection, the connection stays open until either party closes it or some problem cause disconnect.
 
Back
Top