Topic: Need help with naming my classes.
Hello,
like I said before, I'm integrating wolfSSL into my C++ library. Maintainability and flexibility require wolfSLL's API to be wrapped, of course. Not only that, I wrap it in C++ classes where possible which can encapsulate requirements that make my code more robust.
All in all, I'm free to chose my own names for things. And I believe that using the Right Names in a program is very important.
Until now I used the name 'session' for a (wrapped) WOLFSSL struct. This seemed logical because I viewed making an actual connection to a server, doing the TLS handshake and starting to use the socket for encrypted communication to be one "session".
However, then I ran into `struct WOLFSSL_SESSION` and now I'm confused. If there is something like an SSL session concept, then I suppose this means that you can lose your server connection, but re-establish it (doing another handshake or whatever) without that the user notices this: they can just continue with what they were doing using the (re-established) encrypted channel.
I am not sure how this works, but I can imagine that re-establishing a secure connection, even if it uses the same socket (fd), requires the creation of a new WOLFSSL? In that case there is a clear distinction between a 'session' (from the user point of view, there is just one), and a WOLFSSL struct, that represents ... well, what?
I don't want to call my classes/functions 'ssl' (as wolfssl does internally). That stands for 'Secure Socket Layer', and that is not what it represents.
I was contemplating `ssl_connection`.
So, what exactly does a WOLFSSL struct represent? Would 'SSL connection' be a good description?
Perhaps I should phrase it as follows:
If you had to rename your WOLFSSL struct to "WOLFSSL_SOMETHING", what would you use for the SOMETHING?