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

In TLS build of library, support both TLS and non-TLS connections. #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joelnordell
Copy link
Contributor

@joelnordell joelnordell commented Dec 8, 2016

The choice is made at runtime, if a TLS URI (https:// or wss://) is given, the TLS client will be used, otherwise the non-TLS client will be used.

Additionally, a new constructor is introduced allowing the URI to be passed at construction, which allows the above selection to occur, otherwise only the default for the library (TLS or non-TLS) will be used (preserving the original behavior).

This allows libsioclient_tls.a to support both TLS and non-TLS connections, chosen at runtime, without recompiling.

With this change, you can now do the following:

sio::client* c1;
sio::client* c2;

c1 = new sio::client("https://foo/");
c2 = new sio::client("http://foo/");

c1->connect();
c2->connect();

The choice is made at runtime, if a TLS URI (https:// or wss://) is
given, the TLS client will be used, otherwise the non-TLS client will be
used.

Additionally, a new constructor is introduced allowing the URI to be
passed at construction, which allows the above selection to occur,
otherwise only the default for the library (TLS or non-TLS) will be used
(preserving the original behavior).
@joelnordell joelnordell force-pushed the eris-sio_tls_support_non_tls_uris branch from c00e9e3 to 20ce61d Compare December 8, 2016 23:39
@joelnordell
Copy link
Contributor Author

NOTE: this will have a small merge conflict with #136.

mtdxc pushed a commit to mtdxc/socket.io-client-cpp that referenced this pull request Oct 16, 2018
…-TLS connections.

The choice is made at runtime, if a TLS URI (https:// or wss://) is
given, the TLS client will be used, otherwise the non-TLS client will be
used.

Additionally, a new constructor is introduced allowing the URI to be
passed at construction, which allows the above selection to occur,
otherwise only the default for the library (TLS or non-TLS) will be used
(preserving the original behavior).
@mmihic96
Copy link

Hi,

When will this be merged?

mtdxc pushed a commit to mtdxc/socket.io-client-cpp that referenced this pull request Jul 29, 2021
…-TLS connections.

The choice is made at runtime, if a TLS URI (https:// or wss://) is
given, the TLS client will be used, otherwise the non-TLS client will be
used.

Additionally, a new constructor is introduced allowing the URI to be
passed at construction, which allows the above selection to occur,
otherwise only the default for the library (TLS or non-TLS) will be used
(preserving the original behavior).
mtdxc pushed a commit to mtdxc/socket.io-client-cpp that referenced this pull request Jul 29, 2021
…-TLS connections.

The choice is made at runtime, if a TLS URI (https:// or wss://) is
given, the TLS client will be used, otherwise the non-TLS client will be
used.

Additionally, a new constructor is introduced allowing the URI to be
passed at construction, which allows the above selection to occur,
otherwise only the default for the library (TLS or non-TLS) will be used
(preserving the original behavior).
@Vicidel
Copy link

Vicidel commented Jun 29, 2023

Is there any progress/update here?

@jmigual
Copy link
Collaborator

jmigual commented Jun 30, 2023

Hi! I'll take a look. I think the main developer is not around any more and I'm mostly in charge of maintaining the CMake but let's see what I can do.

@jmigual
Copy link
Collaborator

jmigual commented Jun 30, 2023

Okay @joelnordell I opened a PR to update it to the state of master ErisExchange#5

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

Successfully merging this pull request may close these issues.

5 participants