-
Notifications
You must be signed in to change notification settings - Fork 400
how to create hubconnection with websocket for android client #64
Comments
Have you taken a look at https://docs.microsoft.com/en-us/aspnet/core/signalr/java-client?view=aspnetcore-2.2? |
Yes...but its asp.net core..my backend signalr is in asp.net....i used this asp.net core lib but failed to connect with signalr server |
Those are not compatible. You have to use either asp.net server with asp.net client, or asp.net core signalr with asp.net core client. You can't mix them. |
Do you any signarl java client which support websocket transport with asp.net signalr server .? |
There is https://github.com/SignalR/java-client however it is no longer maintained. |
Thnk you for you fast replay....i tried to generate jar files using this but i am not able to generate jar files..can you help me to build jar files using this java client.. |
I've never used that client before so I have no idea how to use it sorry. |
The client at https://github.com/SignalR/java-client has been deprecated. While SignalR on asp.net is still supported, just that specific client is no longer supported. 🙁 |
dear all |
Have you tried and run into issues using the SignalR Java client with your AspNetCore SignalR 2.1 app? It should work. |
@gxh-apologize i think so it should work..there is no version compatibility issue with .core signalr ....but if you have .net signalr as backend and you are using .net core signalr at front end then you faced version compatibility issues.. |
04-18 14:09:14.827 3655-3724/cn.gxh.view E/OkHttpWebSocketWrapper: WebSocket closed from an error: Expected 'Connection' header value 'Upgrade' but was 'null'.
04-18 14:09:14.831 3655-3724/cn.gxh.view E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher |
@mikaelm12 there is not connectionStateChanged listener..how to get connection state changed event ... |
@gxh-apologize What version of the SignalR Java client are you using? And do you have websockets enabled on your back end site? Cloud providers usually have it off by default and have a toggle to turn websocket support on. |
@hirenpatel868 In the current version of the Java client we only have two states. |
@mikaelm12
` |
@mikaelm12...ok i will check it out..but what about facing issue of signalr disconnection at certain interval..so is there any specific setting we have to apply at both ends..? how many users at a time can connect with one signalr backend..is there any limitations for numbers of users signalr can handle ? |
@gxh-apologize One thing you could do is upgrade to the 3.0.0-preview3-19153-02 version. Note that it is a preview version though. But with this you can set the transport to LongPolling and see if you are able to successfully connect. |
You would set LongPolling like this HubConnection hubConnection = HubConnectionBuilder
.create("http://example.com")
.withTransport(TransportEnum.LONG_POLLING)
.build(); |
Can you elaborate on this? This is not something you should be seeing normally without any special configuration.
This is a very application/machine specific question. |
@mikaelm12 |
No description provided.
The text was updated successfully, but these errors were encountered: