How to use Socket.IO to implement communication between micro-applications?

Why? I wrote the micro-application loader myself, how could I use Qiankun’s stuff for communication? What is Socket.IO? 1. Socket.IO is a library that enables low-latency, bidirectional and event-based communication between clients and servers. 2. Socket.IO is not a WebSocket implementation. While Socket.IO does use WebSocket for transport when possible, it adds additional metadata to […]

vue-advanced-chat usage guide (socket.io+node+vue implements chat)

demo address: – Git address of vue-advanced-chat: https://github.com/advanced-chat/vue-advanced-chat 1. Build demo After cloning the demo address, install the dependencies in the demo directory and start it. The page after startup is as follows: 2. Front-end code analysis 2.1 Analysis of key APIs current-user-id: current user id room-id: Can a specific room be loaded at any […]

Use of Socket.IO

Official website Introduction Writing chat applications using popular web application stacks such as LAMP (PHP) is often very difficult. It involves polling the server for changes, tracking timestamps, and is much slower than it should be. Traditionally, sockets have been the solution for most real-time chat systems, providing a two-way communication channel between the client […]

Spingboot integrates netty-socket.io

Spingboot integrates netty-socket.io rely Pay attention to the version number, otherwise, if the client version is wrong, you will not be able to connect https://github.com/mrniko/netty-socketio ? “ <dependency> <groupId>com.corundumstudio.socketio</groupId> <artifactId>netty-socketio</artifactId> </dependency> <zyy-socket.version>2.0.2</zyy-socket.version> structure 3 configuration package com.zyy.wss.config; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONUtil; import com.corundumstudio.socketio.SocketConfig; import com.corundumstudio.socketio.SocketIOServer; import com.corundumstudio.socketio.annotation.SpringAnnotationScanner; import com.zyy.framework.model.constant.SecurityConstants; import com.zyy.wss.handler.NettySocketEventHandler; import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.util.Strings; […]

The basic use of socket.io in vue

For the previous article, the basic use of socket was not mentioned. This article talks about the use of socket.io in the front end and back end. Project address: Crooked fChat The technology stack of the project is: Frontend: vue2 + socket.io Backend: express + socket.io The following are the specific steps: 1. Install dependencies […]

A Complete Guide to Connecting Socket.IO with Vue 3 and TypeScript

Socket.IO is a popular real-time communication library that provides developers with simple and powerful tools to build real-time applications. In this article, we’ll explore how to use Vue 3 and TypeScript to connect and use Socket.IO. We will provide detailed installation tutorials, feature introductions, usage methods, and sample codes, and discuss the pros and cons […]

React project and node project use socket.io to connect and send information

Requires front-end and back-end connections to communicate The front-end part react-demo install dependencies yarn add socket.io-client src\app.ts const {<!– –> io } = require(“socket.io-client”); const socket = io(‘http://localhost:3000’,{<!– –> withCredentials: true, }); console.log(‘vv’,socket); // client-side socket.on(“connect”, () => {<!– –> console.log(‘con’,socket.id); }); socket.on(“disconnect”, () => {<!– –> console.log(‘fail’,socket.id); }); Backend part node- demo install dependencies […]

In-depth analysis of Aizhi EdgerOS How to use Socket.IO to easily realize two-way communication in Aizhi application

1. What is Socket.IO? Socket.IO is a real-time application framework based on event communication, which is widely used in instant messaging, notification and message push, real-time analysis and other scenarios. Socket.IO consists of two parts: Modules on the Server side (JSRE has provided the socket.io module); Modules on the client side. Socket.IO divides the implementation […]

[Solved] koa2 socket.io server 404 and port problem solving

GET http://127.0.0.1:3001/socket.io/?EIO=4 & amp;transport=polling & amp;t=O7nczsQ net::ERR_CONNECTION_REFUSED problem, need to be added on the server server.listen(3001)//The port is defined by itself, do not conflict with the koa2 startup port Access to XMLHttpRequest at ‘http://127.0.0.1:3001/socket.io/?EIO=4 & amp;transport=polling & amp;t=O7ndNvO’ from origin ‘http://127.0.0.1: 5501’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the […]