I created a server and generated my client as an asynchronous one.
So when I connect, I do so asynchronously. That's fine.
I have a method on my client (a callback method) that receives data from the server. The server sends this data using an asychronous method too.
To receive this data on my client, I expected to have ONLY a method like this one it generated for me:
public void SendToClient(string dataToSend)
{
}
Although it has a bizarre name, this is the method that I expected - it is called when data is received.
However it has also generated these methods:
public IAsyncResult BeginSendToClient(string dataToSend, AsyncCallback callback, object asyncState)
{
throw new NotImplementedException();
}
public void EndSendToClient(IAsyncResult result)
{
throw new NotImplementedException();
}
I don't know how to use them. It's like an asynchronous receive, or something. How would I use them to receive data?