socketio icon indicating copy to clipboard operation
socketio copied to clipboard

socket-io: Update the SocketID to work with a user defined prefix

Open njones opened this issue 2 years ago • 0 comments

Currently the SocketID has a generated prefix from one source. In order to allow custom prefixes the ID should contain two parts the ID and the Prefix. This way there can't be custom generators that can generate fake-able ID's in the system. The two parts could look like something as simple as:

type ID struct { prefix, id string } 

This needs to be threaded throughout the system, and must convert to a String() for logging and debugging.

njones avatar Apr 18 '23 10:04 njones