0

サーバー(socket.io)からID(ユニカルキー)を取得するには?

私は疲れたclients[socket.id] = socket;

しかし、私はエラーが発生します

 connections property is deprecated. use getconnections() method

何か案が?

4

1 に答える 1

0

次のようにして、socket.io でソケットの ID を取得できます。

var id = socket.id;
于 2013-07-16T08:47:46.073 に答える