I'm very confused by your usage of terms client, server, thread, stream.
It seems like your TClientThread is actually a Peer Thread on a server.
In thast case you should call (a response from server to client (browser) )
Socket.SendString('ok');
after or inside
ProcessingData(S);
as a part of your logical protocol.
Anyway, it seems like you're trying to implement a usual webserver (with Synapse).
There are Synapse server demo, FPC's TFPHttpServer.
Why don't you use it?