Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we use it with websockets? #59

Closed
waqqasjabbar opened this issue Jan 26, 2021 · 4 comments
Closed

Can we use it with websockets? #59

waqqasjabbar opened this issue Jan 26, 2021 · 4 comments

Comments

@waqqasjabbar
Copy link

Hi,
I would like to use the library with Boost::Beast websockets. How can I do that?

@qchateau
Copy link
Owner

Hi, nice suggestion. I've never tried it.
Both the client and the server are designed to be transport agnostic so it may work (or almost work).

Clients are constructed with a connected socket, maybe it will work out of the box if you construct it with a websocket.

Servers are constructed with an acceptor so there are chances it would work as well.

As websockets are not standard sockets, I expect a few API incompatibilities though. Feel free to try it out if you'd like to tinker with packio.

I'll try to find some time to test it on my own, and maybe officially support it, with unit tests and such

@qchateau
Copy link
Owner

I've taken a quick look at this tonight and it does not seem that simple. I'd probably need to add an abstraction layer between packio and asio to allow customization.
Not sure when I'll find time for that, but that may be the next improvement of packio.

@qchateau
Copy link
Owner

qchateau commented Feb 8, 2021

Hey, to keep you up to date, I've been working on websockets and I've ironed out most bugs. It should be available pretty soon. By the way my guess is that packio will offer SSL support soon as well as supporting websockets and SSL have a lot in common (intermediary transport layer)

@qchateau qchateau mentioned this issue Feb 9, 2021
Merged
@qchateau
Copy link
Owner

qchateau commented Feb 9, 2021

I've officially added support for websockets (which means they are part of the unit tests). I'm planning on adding support for SSL, cleaning up the docs and releasing 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants