我正在使用套接字io进行聊天。我这边正在使用android。我想获取特定的ID。当我发送用户名时。我想显示用户ID。我已经使用了如下所示。
const userId = user.userId; const user1 = usernames[userId]; console.log("user1 :"+user1);
但是它仅显示用户名如何显示用户ID或如何获取用户ID。请帮我?
java sockets android node.js socket.io
android ×1
java ×1
node.js ×1
socket.io ×1
sockets ×1