socketio not communicating

Got a UUID on the client but just receiving empty string on the server IDK why
1 Reply
Zach
Zach12mo ago
server:
socket.on("join", (uuid, cb) => {
console.log(`game ${uuid} joined`); // Empty string
console.log(typeof uuid); // string
console.log(uuid.length); // 0
...
socket.on("join", (uuid, cb) => {
console.log(`game ${uuid} joined`); // Empty string
console.log(typeof uuid); // string
console.log(uuid.length); // 0
...
client:
socket.emit('join', uuid, (confirm, previousDrops) => {
console.log(`joining ${uuid}`) // has correct UUID
...
socket.emit('join', uuid, (confirm, previousDrops) => {
console.log(`joining ${uuid}`) // has correct UUID
...
ok it seems socketio callbacks are not synchronous going to avoid using callbacks then