Skip to content

Question: react-native-use-websocket onMessage response different from 'normal' ws response #12

@wswebcreation

Description

@wswebcreation

First of all thanks for this great lib!

I'm trying to use react-native-use-websocket in a RN 0.66.3. I know that you can there use the Websocket but for some reason it was failing all the time and this lib didn't.

The WS that I need to connect to responds with a buffer, it's basically streaming images so they can be used to mimic a video.
The challenge I have now is that when I set up a WS and log the onMessage I get back a JSON response, something like this

onMessage =  {"data": [], "isTrusted": false}

But when I use a simple Node script when I use the ws lib and log the result I see the buffer being printed. Is there some reason why this isn't working in the same way? Do I need to configure something else?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions