anchor.diff:  
   SockJS.Client _socket;
   Future<StompClient> connect(String url, {
  -        String host, 
  -        String login, 
  -        String passcode, 
  +        String host,
  +        String login,
  +        String passcode,
           List<int> heartbeat,
           List<String> protocolsWhiteList,
  -        void onDisconnect(),
  -        void onError(String message, String detail, [Map<String, String> headers]),
  +        void onDisconnect(StompClient client),
  +        void onError(StompClient client, String message, String detail, [Map<String, String> headers]),
           void onConnectionError(error, stacktrace),
  +        void onClose(),
           bool debugFlag:false
         }) {
  -        Future<Object> waitingForConnection = _SockDartConnector.start(url, protocolsWhiteList, debugFlag);
  +        Future<Object> waitingForConnection = _SockDartConnector.start(url, protocolsWhiteList, debugFlag,
  +          onClose: onClose);
   
           return waitingForConnection.then((connector){
  -             print("Got SockJS/SockDart connection");
  +            if (debugFlag) print("Got SockJS/SockDart connection");
               Future<StompClient> waitingForStompClientHolder = StompClient.connect(connector,
                   host: host,
  -                login: login, 
  -                passcode: passcode, 
  +                login: login,
  +                passcode: passcode,
                   heartbeat: heartbeat,
                   onDisconnect: onDisconnect,
                   onError: onError).catchError((e) {
  
positive.code:                   onConnectionError(e, e);
                  });
  
              return(waitingForStompClientHolder);    
          });
  }
  
  
negative.code:     });
      _socket.onClose.listen((event) {
        if (onClose != null) onClose();
      });
  
    }
  
  