dhbaird / easywsclient

A short and sweet WebSocket client for C++
MIT License
751 stars 204 forks source link

add onreceivedmessage function #68

Closed developernew123 closed 6 years ago

developernew123 commented 6 years ago

add onreceivedmessage function to be a handler for messages so that I don't use poll() and dispatch() very many times

dhbaird commented 6 years ago

An onreceivedmessage handler isn't straightforward, and I do agree it would be nice though, but do you think you could do this instead?

developernew123 commented 6 years ago

yes it would but wouldn't this make anything bad to the send() function ?

developernew123 commented 6 years ago

when I use it as a thread it doesn't send

developernew123 commented 6 years ago

It worked well I was using the thread after the return of the function which made it fail