Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add host parameter #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

themaxsmith
Copy link

Description

  • Passes the host parameter to the underlying iOS and Droid packages.

CHANGELOG

  • [feat] Add host parameter

@vingrad
Copy link

vingrad commented Aug 7, 2023

@themaxsmith I checked your code changes, but I got the error:

java.net.UnknownHostException: Unable to resolve host "ws-local.pusher.com": No address associated with hostname

Do you know why?

@eng-ahmad-sameer
Copy link

Any near plans to fix and merge this PR?
@themaxsmith
@vingrad

Copy link

@jakobevangelista jakobevangelista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, added custom hosts

@vokhuyetOz
Copy link

vokhuyetOz commented Nov 2, 2023

it seems problem of native sdk.
i updated to newest version in this folk.
could you test it?
https://github.com/vokhuyetOz/pusher-websocket-react-native

@themaxsmith I checked your code changes, but I got the error:

java.net.UnknownHostException: Unable to resolve host "ws-local.pusher.com": No address associated with hostname

Do you know why?

@hichemfantar
Copy link

Those of you who created forks, did you manage to make it work with custom hosts?

@hichemfantar
Copy link

I got it to work but only on Android, IOS for some reason refuses to connect, just keeps attempting to reconnect.

@vokhuyetOz
Copy link

https://github.com/vokhuyetOz/pusher-websocket-react-native
it worked on myside, both android and ios

@hichemfantar
Copy link

https://github.com/vokhuyetOz/pusher-websocket-react-native it worked on myside, both android and ios

what service is your host based on? Socketi, Ably?

@vokhuyetOz
Copy link

yes, i use Socketi on BE side

@vokhuyetOz
Copy link

vokhuyetOz commented Dec 8, 2023

import {
  Pusher,
  PusherEvent,
  PusherAuthorizerResult,
} from '@pusher/pusher-websocket-react-native';

const handleConnect = async () => {
      try {
        const pusher = Pusher.getInstance();
        await pusher.init({
          apiKey: 'apiKey',
          onAuthorizer,
          host: 'soketi.example.com',
          cluster: 'mt1',
          onConnectionStateChange: e => {
            console.log('onConnectionStateChange', e);
          },
          onError: e => {
            console.log('onError', e);
          },
        });
        await pusher.connect();
      } catch {}
    };

@hichemfantar
Copy link

@benw-pusher can we at least mark the property as unstable_host and merge this? this way we can use the property at our own risk.
using unstable_ prefix is pretty popular

@talyssonlima
Copy link

Aren't they going to merge?

@HaidarZ
Copy link

HaidarZ commented May 10, 2024

Is there any chance we can get this merged?

@DenisPostnikov
Copy link

Is there any updates?

@hichemfantar
Copy link

Just use pusher.js it's working without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants