Click here to Skip to main content
15,889,391 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are implementing Client WebSocket for our .Net Application using the ClientWebSocket class in System.Net.WebSockets namespace. We are calling ClientWebSocket.ConnectAsync Method (Uri, CancellationToken) for Asynchronous socket connection. And after the successful asynchronous connection is done, we need to call a callback function. But we are not sure how to call the callback function. Please help us to do the same.

What I have tried:

We tried the System.Threading.Tasks.Task class's ContinueWith(Action<Task, Object>, Object, CancellationToken) method to call the callback function but we could not succeed. Please let us know the best solution to our problem.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900