I have an app that makes a socket connection to a server, and leave the connection open. This works and whenever a user presses a button I can receive it just fine on the server. The only sample code I coudl find for receiving data from the server seems to be blocking:
Dim tr As TextReader
tr.Initialize(Socket1.InputStream)
Dim sb As StringBuilder
sb.Initialize
sb.Append(tr.ReadLine) 'read at least one line
Do While tr.Ready
sb.Append(CRLF).Append(tr.ReadLine)
Loop
How can I Asynchronously receive the text messages from the server without need to stay in this loop?
Thanks in advance..