hosseinmd / react-signalr

MIT License
43 stars 14 forks source link

How to add connection options such as skipNegotiation or transport #17

Closed aboccag closed 1 year ago

aboccag commented 1 year ago

Hello,

I would like to skip the negotiation.

{
      skipNegotiation: true,
      transport: signalR.HttpTransportType.WebSockets
}

The microsoft signalR library allows you to do the following configuration


connection = new signalR.HubConnectionBuilder()
    .configureLogging(signalR.LogLevel.Debug)
    .withUrl("http://localhost:5000/decisionHub", {
      skipNegotiation: true,
      transport: signalR.HttpTransportType.WebSockets
    })
    .build();

Thank you

Best regards

hosseinmd commented 1 year ago

Add your config to provider props. We added configs to provider, in this way you could have many providers with different config. Good luck.