engine.io
engine.io copied to clipboard
[TS] socket.id is private and there is no public getter
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.