on the onopen method can I know from wich .html the request came from ? so I can make an if out of that and do my stuff? I have index.html and chat.html I need to do different things on different loads
@ServerEndpoint("/proyecto")enter code here
public class controlador {
static ArrayList Usuarios = new ArrayList();
private static final Set sessions = Collections.synchronizedSet(new HashSet());
@OnOpen
public void onOpen(Session s) {
System.out.println(s.getId() + " abrió conexión");
sessions.add(s);
loopUsuariosId(s);
broadcastMsg("nuevousu", s);
}
Aucun commentaire:
Enregistrer un commentaire