well im trying to make a simple chat app using electron.js and socket.io, i made 2 "guis" chat and login html, when i switch between them, the socket.id is always other than previous - it connects to the new socket after any page refresh. I want to connect to the socket on login, if the username box isnt null - it should check if the username exists on server, after that it should go to chat html and then it should listen for new messages and allow user to send a message to the socket
#electron & socket.io - makes new socket connection after page refresh
19 messages · Page 1 of 1 (latest)
yea but is there any way to keep the socket the same after switch between these htmls
?
no
so uh i would need to make everything in
1 file
?
and then change the html source every time
yes
u mean like session ids and stuff
yes
aight