onopen method
void
onopen([
- dynamic _
Called upon transport open.
@api private
Implementation
void onopen([_]) {
_logger.fine('open');
// clear old subs
cleanup();
// mark as open
readyState = 'open';
emit('open');
// add subs
var socket = engine;
subs.add(util.on(socket, 'data', ondata));
subs.add(util.on(socket, 'ping', onping));
subs.add(util.on(socket, 'pong', onpong));
subs.add(util.on(socket, 'error', onerror));
subs.add(util.on(socket, 'close', onclose));
subs.add(util.on(decoder, 'decoded', ondecoded));
}