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

[Signalr-Cpp]Please make constructor of hub_connection public #30572

Closed
albyho opened this issue Mar 2, 2021 · 3 comments
Closed

[Signalr-Cpp]Please make constructor of hub_connection public #30572

albyho opened this issue Mar 2, 2021 · 3 comments
Labels
area-signalr Includes: SignalR clients and servers

Comments

@albyho
Copy link

albyho commented Mar 2, 2021

We need to create a instance of hub_connection as a filed in a class.

@albyho albyho changed the title Please make constructor of hub_connection public [Signalr-Cpp]Please make constructor of hub_connection public Mar 2, 2021
@javiercn javiercn added the area-signalr Includes: SignalR clients and servers label Mar 2, 2021
@BrennanConroy
Copy link
Member

BrennanConroy commented Mar 2, 2021

What's wrong with using the hub_connection_builder? Using the builder is how all implementations of the signalr clients create a connection.

@albyho
Copy link
Author

albyho commented Mar 3, 2021

What's wrong with using the hub_connection_builder? Using the builder is how all implementations of the signalr clients create a connection.

hub_connection_builder creates
hub_connection instance in stack and it’s not copyable.

@BrennanConroy
Copy link
Member

hub_connection does have a move constructor, so you can move it into a class for storage currently.

We are experimenting with returning a shared_ptr<hub_connection> in aspnet/SignalR-Client-Cpp#36 and that's probably the direction we'll continue on.

@albyho albyho closed this as completed Mar 3, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Apr 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

No branches or pull requests

3 participants