This repository was archived by the owner on Aug 25, 2022. It is now read-only.

Description
ı could not connect what I did
$client = new Client(new Version2X('http://localhost:3000'));
$client->initialize();
$client->emit('posts', ['age' => 28]);
$client->close();
js code
const index = require('http').createServer();
const options = {
cors: {
origin: '*',
},
};
const io = require('socket.io')(index, options);
index.listen(3000);
io.on('connection', function (socket) {
console.log('sockete birileri bağlandı.');
socket.on('posts', function (data) {
io.emit('posts', data);
});
socket.on('disconnect', function () {
console.log('birileri geldi ve gitti.');
});
});