Of course. Unless the socket is set non-block, recv() is a blocking call. Your condition is while(iByteCount > 0), but as long as the client stays connected and there are no errors, that will never happen*. This loop will just read everything the client sends, then keep waiting for more.
You need to process the data as you receive it. That could mean just checking each chunk for ! until you find it then breaking out of the loop.
* On linux, 0 will only happen if the client has disconnected, ie, the socket is defunct.