code: public Set<SocketAddress> getCurrentSessionAddresses() {
          Set<SocketAddress> result = new HashSet<SocketAddress>();
          synchronized (lock) {
              result.addAll(sessions.keySet());
              result.addAll(pendingConnections.keySet());
          }
          return result;
      }
docs: Returns a list of all server socket addresses to which sessions are already
  established or being established
  @return List of socket addresses