engine.io icon indicating copy to clipboard operation
engine.io copied to clipboard

[TS] socket.id is private and there is no public getter

Open SonahtQ opened this issue 3 years ago • 0 comments

Describe the bug Recently engine.io got whole new typescript code, but there are places that need for fixes. One of it is private field id in Socket class. Getting and id of Socket is one of core mechanism that people use in theirs projects. Now there is no way for getting an id of Socket due to it's private accessor.

Engine.IO server version: 6.2.0

Solution id field in Socket class is set to be readonly so it should be 100% safe to switch it from being private to being public. Other way for fixing it can be for example adding public getter method to Socket class.

SonahtQ avatar May 21 '22 13:05 SonahtQ