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

Merge SSL and non-SSL interfaces #26

Closed
ghost opened this issue Dec 30, 2018 · 1 comment
Closed

Merge SSL and non-SSL interfaces #26

ghost opened this issue Dec 30, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 30, 2018

Instead of having two sets of functions; us_ssl_socket_ext and us_socket_ext, etc, you could have one single:

us_socket * can be SSL or non-SSL, it is determined by us_socket_ext(SSL or not, ...)

Instead of two different sets of functions almost identical, what is not identical could be hints instead. So SSL options could be hints that can be ignored for non-SSL.

That would clear up a lot of template magic in µWS and make it a lot easier to work with.

First step: add a new layer named us_any_socket and us_any_socket_ext, etc -> have it be a set of macros to correct function.

Second step: rename everything so that _any prefix can be removed.

@ghost ghost added the enhancement label Dec 30, 2018
@ghost
Copy link
Author

ghost commented Jan 25, 2019

Done, libusockets_new.h has the new interface

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

No branches or pull requests

0 participants