You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm stuck with an error when trying to connect to a private channel using my remote authorizer.
This is my Authorizer:
```
class CustomAuthorizer : IAuthorizer
{
private Uri _authEndpoint;
public CustomAuthorizer(string authEndpoint)
{
_authEndpoint = new Uri(authEndpoint);
}
I pass this Uri to the constructor: http://mng-mobile.it/broadcasting/auth
And Uri get parsed correctly.
Then I initialize PurePusherClient:
public void Init()
{
var auth = new CustomAuthorizer(AppConfig.PUSHER_AUTH);
var options = new PurePusherClientOptions()
{
Authorizer = auth,
Encrypted = true,
};
this.Pusher = new PurePusherClient(AppConfig.PUSHER_APP_KEY, options);
Pusher.Connected += Pusher_Connected;
Pusher.ConnectionStateChanged += Pusher_ConnectionStateChanged;
Pusher.Error += Pusher_Error;
Pusher.Connect();
}
I'm getting System.UriFormatException: 'Invalid URI: The hostname could not be parsed.'
on Pure.Connect().
StackTrace:
error System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at PureWebSockets.PureWebSocket.Connect()
Can someone help to fix this problem?
The text was updated successfully, but these errors were encountered:
I'm stuck with an error when trying to connect to a private channel using my remote authorizer.
This is my Authorizer:
```
class CustomAuthorizer : IAuthorizer
{
private Uri _authEndpoint;
public CustomAuthorizer(string authEndpoint)
{
_authEndpoint = new Uri(authEndpoint);
}
public void Init()
{
var auth = new CustomAuthorizer(AppConfig.PUSHER_AUTH);
var options = new PurePusherClientOptions()
{
Authorizer = auth,
Encrypted = true,
};
this.Pusher = new PurePusherClient(AppConfig.PUSHER_APP_KEY, options);
Pusher.Connected += Pusher_Connected;
Pusher.ConnectionStateChanged += Pusher_ConnectionStateChanged;
Pusher.Error += Pusher_Error;
error System.UriFormatException: Invalid URI: The hostname could not be parsed.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at PureWebSockets.PureWebSocket.Connect()
The text was updated successfully, but these errors were encountered: