Sharp C

Sharp C

  • NA
  • 11
  • 1.4k

Websocket sendasync response from request

Oct 14 2019 9:29 AM
I have a connection class which will maintain a web socket connection to my server. In my connection class, I have a function task < product > getproduct; AWebsocket.sendasync But the response from server has to be handled in onmessage event, but I would like caller who make use of my class will get the response from the function call, how can I pick up the response from onmessage and return directly from getproduct function?