Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions dummy-server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var io = require('socket.io')(server, {
console.log('Socket-io server running on 8080.');
console.log('Emit to "socketio-client" or "socketio-client-ack" for debugging.');


io.on('connection', function (socket) {
socket.emit('message', { hello: 'world' });
socket.on('socketio-client', function (data) {
Expand All @@ -18,6 +19,28 @@ io.on('connection', function (socket) {
console.log('on socketio-client-ack: ', data);
fn(data);
});

socket.on('teste-room', (data) => {
io.to('room1').emit('eventRoom', data);
});

socket.on('join', (room) => {
socket.join(room);
});

socket.on('leave', (room) => {
socket.leave(room);
});

io.of("/").adapter.on("join-room", (room, id) => {
console.log(`socket ${id} has joined room ${room}`);
});

io.of("/").adapter.on("leave-room", (room, id) => {
console.log(`socket ${id} has exited room ${room}`);
});


});

server.listen(8080);
237 changes: 235 additions & 2 deletions dummy-server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react-client-tool/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"/workspaces/socketio-client-tool/react-client-tool/src/index.js":"1","/workspaces/socketio-client-tool/react-client-tool/src/App.jsx":"2","/workspaces/socketio-client-tool/react-client-tool/src/components/connection.jsx":"3","/workspaces/socketio-client-tool/react-client-tool/src/components/emitter.jsx":"4","/workspaces/socketio-client-tool/react-client-tool/src/components/listen.jsx":"5","/workspaces/socketio-client-tool/react-client-tool/src/components/ack.jsx":"6","/workspaces/socketio-client-tool/react-client-tool/src/components/history.jsx":"7"},{"size":219,"mtime":1614783292700,"results":"8","hashOfConfig":"9"},{"size":6786,"mtime":1614800228558,"results":"10","hashOfConfig":"9"},{"size":2111,"mtime":1614783292694,"results":"11","hashOfConfig":"9"},{"size":2953,"mtime":1614783292695,"results":"12","hashOfConfig":"9"},{"size":1731,"mtime":1614798860299,"results":"13","hashOfConfig":"9"},{"size":206,"mtime":1614783292693,"results":"14","hashOfConfig":"9"},{"size":1552,"mtime":1614783292697,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"krbgje",{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"22"},"/workspaces/socketio-client-tool/react-client-tool/src/index.js",[],"/workspaces/socketio-client-tool/react-client-tool/src/App.jsx",[],"/workspaces/socketio-client-tool/react-client-tool/src/components/connection.jsx",[],["31","32"],"/workspaces/socketio-client-tool/react-client-tool/src/components/emitter.jsx",[],"/workspaces/socketio-client-tool/react-client-tool/src/components/listen.jsx",[],"/workspaces/socketio-client-tool/react-client-tool/src/components/ack.jsx",[],"/workspaces/socketio-client-tool/react-client-tool/src/components/history.jsx",[],{"ruleId":"33","replacedBy":"34"},{"ruleId":"35","replacedBy":"36"},"no-native-reassign",["37"],"no-negated-in-lhs",["38"],"no-global-assign","no-unsafe-negation"]
[{"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/index.js":"1","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/App.jsx":"2","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/ack.jsx":"3","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/emitter.jsx":"4","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/connection.jsx":"5","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/listen.jsx":"6","/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/history.jsx":"7"},{"size":219,"mtime":1644275339439,"results":"8","hashOfConfig":"9"},{"size":6803,"mtime":1644278313161,"results":"10","hashOfConfig":"9"},{"size":206,"mtime":1644275339438,"results":"11","hashOfConfig":"9"},{"size":2953,"mtime":1644275339438,"results":"12","hashOfConfig":"9"},{"size":2111,"mtime":1644275339438,"results":"13","hashOfConfig":"9"},{"size":1731,"mtime":1644275339438,"results":"14","hashOfConfig":"9"},{"size":1552,"mtime":1644275339438,"results":"15","hashOfConfig":"9"},{"filePath":"16","messages":"17","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"4potsl",{"filePath":"18","messages":"19","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/index.js",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/App.jsx",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/ack.jsx",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/emitter.jsx",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/connection.jsx",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/listen.jsx",[],"/Users/iagodias/Documents/projeto/socketio-client-tool/react-client-tool/src/components/history.jsx",[]]
Loading