njones / socketio

A Modern SocketIO library for go
MIT License
60 stars 9 forks source link

Encode the SIO socketID generated prefix #73

Closed njones closed 1 year ago

njones commented 1 year ago

The prefix is encoded to present ASCII characters during logging. The unicode characters can still be seen, by using GoString() or the "%#v" formatting function for the log and fmt Printf() function.

The prefix generator function was refactored to accept an injected date, for testing purposes.

Updating the prefix via a user function has not been implemented, as the ID type needs to change to accommodate this request. Providing a user function will be in a future commit.

[fixes #69]