Reputation: 617
I have a client that is connected to a server successfully. I use the Socket.Receive() method to receive data from the server. However, it is a blocking method. I use Socket.BeginReceive() to receive packets on server side from connected clients asynchronously, is it the same for the client side of I want to receive packets from the server asynchronously?
Upvotes: 2
Views: 126
Reputation: 171178
Yes, why would it not? Really unsure what else to say.
Consider using await
instead of the (almost) obsolete APM pattern. It's the same thing in a more convenient form.
Upvotes: 1