SO Team,
I have created a Server that sends the JSON string into the TCPClient Stream, This JSON Data will be sent when the user clicks on the Mouse. For Example, for every click of the position System.Windows.Point (x,y) coordinate will be sent to the Client for Processing.
Now Since in this case, the Client does not know when the Data will be sent from Server, Is there an approach to Read-only when the Data is available in the NetworkStream.
Earlier I have worked on a TCP client and server, where the server keeps pushing the data every second, So I created a Timer Event to work with that case.
But in this use-case, I wanted to explore a better solution wherein, once WebRequest(client) Establishes the Connection with Server, it reads only when the Stream is updated with data. Is there any resources that I can further explore to accomplish this
Thanks in Advance !!