gmosx / dart-wamp

An implementation of the WAMP (http://wamp.ws) protocol for Dart.
BSD 2-Clause "Simplified" License
19 stars 6 forks source link

Change temp sessionID to more robust UUID #2

Closed delaneyj closed 10 years ago

delaneyj commented 10 years ago

client.dart line 12...

sessionId = rnd.nextInt(99999).toString(); // TODO: use some kind of hash.

If you used the http://pub.dartlang.org/packages/uuid package on pub and did

sessionID = uuid.v4(); // something like '110ec58a-a0f2-4ac4-8393-c866d813b8d1'

instead it would be far more useful as a key for store Client and use elsewhere. It also avoid the high likelihood of collisions from the current schema.

gmosx commented 10 years ago

We now use UUID.v4 as default, and it's overridable (WebHandler.generateSessionId).