 
       # When the WebSocket opens, send any requests enqueued.
       socket.addEventListener 'open', ->
+        delay = 2
+
+        notify.info {
+          message: 'Connected to XO-Server'
+        }
+
         # New requests are sent directly.
         call = send
 

    }

  # This service provides an access to the Xen-Orchestra API.
  .service 'xoApi', ($location, $q, notify) ->
    url = do ->
      # Note: The path is ignored, the WebSocket must be relative to
      # root.


    # Identifier of the next request.
    nextId = 0

    # Delay in seconds from the next reconnection attempt.
    delay = 2

    # Promises linked to the requests.
    deferreds = {}
