philippseith / signalr

SignalR server and client in go
MIT License
131 stars 39 forks source link

negotiateResponse with no availableTransports property #200

Closed rdalbuquerque closed 2 months ago

rdalbuquerque commented 2 months ago

I'm trying to implement a client to connect with a 3rd party signalr server. This is the response from .../negotiate:

{
    "Url": "/_signalr/_apis/***/signalr",
    "ConnectionToken": "***",
    "KeepAliveTimeout": 40.0,
    "DisconnectTimeout": 60.0,
    "ConnectionTimeout": 110.0,
    "TryWebSockets": true,
    "ProtocolVersion": "1.5",
    "TransportConnectTimeout": 10.0,
    "LongPollDelay": 0.0
}

So when NewHTTPConnection reaches

negotiateResponse := negotiateResponse{}
if err := json.Unmarshal(body, &negotiateResponse); err != nil {
    return nil, err
}

availableTransports is an empty list, so the code pases straight through switch case, returning a nil connection and nil error. Is there any way I can manipulate this that I'm missing so I can properly initiate a connection or am I out of luck?

philippseith commented 2 months ago

See #194. This is a ASP.NET SignalR 1.x server which is not supported. This repo only support ASP.NET Core SignalR servers.