Comments (3)
Can you post a bit more info? Specifically what erro you're receiving on client side and maybe a log of what's happening on the server when the error occurred. Thanks.
from bluesocket.
Web trying to connect with socket.io. In the first time, when client connects, he send this data:
Server received from connection at ::1:51265: GET /socket.io/?EIO=4&transport=polling&t=O1X3EZt HTTP/1.1
Host: localhost:1338
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:99.0) Gecko/20100101 Firefox/99.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Origin: http://127.0.0.1:5500
DNT: 1
Connection: keep-alive
Referer: http://127.0.0.1:5500/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
But the next I have this situation and receiving data did not stop. I want to know if maybe I need to send a response?
In javascript
written this code:
<script src="https://cdn.socket.io/3.1.3/socket.io.min.js" integrity="sha384-cPwlPLvBTa3sKAgddT6krw0cJat7egBga3DJepJyrLl4Q9/5WLra3rrnMcyTyOnh" crossorigin="anonymous"></script>
<script>
const socket = io("localhost:1337", {
reconnectionDelay: 5000,
reconnection:false,
transports: ["websocket"],
reconnectionAttempts: 10,
agent: false,
upgrade: false,
rejectUnauthorized: false
});
socket.on("connect", (data) => {
console.log("sdfsdfsdfs");
});
socket.on("connect_error", (err) => {
console.log(err);
});
</script>
Now we don't know how to connect to the server from the web without WebSocket or Socket.io. Maybe you can help us to show the way, how can we do it. Thanks.
from bluesocket.
I found the solution in WebSocket documentation. Thanks.
from bluesocket.
Related Issues (20)
- Socket listen failed on iOS 14.0.1 HOT 7
- Is it possible observe connection with client? HOT 1
- Error code: -9980(0x-26FC), No route to host HOT 12
- 'listen' function unable to bind address HOT 2
- Download multiple files HOT 2
- Swift bluesocket Can't get long data ? HOT 18
- Warnings in Xcode 13 HOT 10
- Cannot connect to listening UNIX socket HOT 6
- Error code: -9993(0x-2709), Invalid argument HOT 6
- Get local IP address HOT 1
- Can not receive tcp packets in hotspot HOT 1
- Tcp Incomplete receiving data HOT 1
- Unable to detect closed socket HOT 3
- Incompatible with swift-argument-parser v1.0.0+ HOT 9
- is there any other
- Reading Less than SOCKET_MINIMUM_READ_BUFFER_SIZE? HOT 1
- A shell task failed with exit code 72 HOT 1
- Task failed with exit code 70
- Postman can not connect to the Example EchoServer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bluesocket.