An example Spring Boot project built with Netty Socket.IO
application.yml
expose your socket server
socket-server.host
should be a static ip to expose for other client beside local client
in this case, it is local client only
socket-server:
port: 8085
host: 127.0.0.1
Run the project with maven or on your ide
./mvnw.cmd
Create a Socket.IO request using either Postman or socket.io client of your choice
-
url
ws://localhost:8085?room=1
-
listening event
get_message
-
message with event name
send_message
{
"room": "1",
"type": "CLIENT",
"message": "hello, this is from client 1"
}
Create a Socket.IO request using either Postman or socket.io client of your choice
-
url
ws://localhost:8085?room=1
-
listening event
get_message
-
message with event name
send_message
{
"room": "1",
"type": "CLIENT",
"message": "hello, this is from client 2"
}
Hourmeng Khy