Created
February 4, 2017 05:53
-
-
Save jonathanpeppers/5ba07ce9956939f3bdc1e5a3d25a1a7a to your computer and use it in GitHub Desktop.
SignalR with Xamarin NSUrlSessionHandler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connection = new HubConnection("http://yourserver.com/signalr"); | |
await connection.Start(new ServerSentEventsTransport(new NativeHttpClient())); | |
//And NativeHttpClient | |
public class NativeHttpClient : DefaultHttpClient | |
{ | |
protected override HttpMessageHandler CreateHandler() | |
{ | |
return new NSUrlSessionHandler(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment