Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
315 stars 80 forks source link

Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE #71

Closed wangfpp closed 4 years ago

wangfpp commented 4 years ago

Description

in web js Error during WebSocket handshake

Steps to reproduce

Or code:

const ws = new WebSocket('ws://172.16.1.219:9679');
    ws.onmessage = evt => {
        console.log(evt)

    }
    ws.onopen = e => {
        console.log(e);
        ws.send('aaaaa');
    }
    ws.onclose = e => {
        console.log(e);
    }

Relevant information

OS Ubuntu20.04
react-native 0.63.1
react-native-tcp-socket 4.2.0
Rapsssito commented 4 years ago

@wangfpp, this not related to react-native-tcp-socket. Please, post this question on StackOverflow.