変数Socketの中身 上記のload.jsでいうと12行目のio.sockets.on('connection', function(socket) {の部分のsocket変数の中身をメモしておきます。 load.jsではsocket.client.conn.server.clientsCountで同時アクセス数を見ていますが、他にも確認出来る変数はいくつかあります。 例えば、socket.nsp.server.eio.clientsCountでも確認出来ます。(こっちはengine.io側なのかな...詳細には分かっていません汗) ↓を見ると色々分かりそう。 { nsp: { name: '/', server: { nsps: [Object], _path: '/socket.io', _serveClient: true, _adapter: [Function: Adapter
![Socket.io (v1.2)の同時アクセス数を取得するミニマム構成とSocketの中身 - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/6bc360fa6284bc54710fc2d321d38514f3cb0c3b/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-412672c5f0600ab9a64263b751f1bc81.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTk3MiZoPTM3OCZ0eHQ9U29ja2V0LmlvJTIwJTI4djEuMiUyOSVFMyU4MSVBRSVFNSU5MCU4QyVFNiU5OSU4MiVFMyU4MiVBMiVFMyU4MiVBRiVFMyU4MiVCQiVFMyU4MiVCOSVFNiU5NSVCMCVFMyU4MiU5MiVFNSU4RiU5NiVFNSVCRSU5NyVFMyU4MSU5OSVFMyU4MiU4QiVFMyU4MyU5RiVFMyU4MyU4QiVFMyU4MyU5RSVFMyU4MyVBMCVFNiVBNyU4QiVFNiU4OCU5MCVFMyU4MSVBOFNvY2tldCVFMyU4MSVBRSVFNCVCOCVBRCVFOCVCQSVBQiZ0eHQtYWxpZ249bGVmdCUyQ3RvcCZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTU2JnM9MjM0ODJmYTY5OGVjYWZkNjM4MzY3YjQyMmIxNDViNGU%26mark-x%3D142%26mark-y%3D57%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZoPTc2Jnc9NzcwJnR4dD0lNDBuMGJpc3VrZSZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9YzY2ZTM4NDNiYzBhOWIzZmVkMzUzNzFlZmYyNmU1ZjU%26blend-x%3D142%26blend-y%3D486%26blend-mode%3Dnormal%26s%3D522021c4bce49b897b7f3e79ce41c06b)