Search the Community
Showing results for tags 'socket.io'.
-
I'm using sockt.io to receive push and pass messages to other users if I'm connected on the same screen, for this I'm using ajaxevent, but I noticed that when another page (user) opens, an error occurs not finding the object (screen ) from the previous open page, it seems that it is lost or because it is the same object (screen) the previous one is destroyed, at this moment it only works on the last opened page, the previous ones give the error below. I'm using a uniFrame Error conection socket and ajaxevent xHTML := ' socketWhats = io.connect('''+pIP_APIWHATSAPP+''' '+ ' ,{transports: [''websocket'']} ' + #13#10 + ' );' + #13#10 + ' socketWhats.emit(''join'','''+lbSessao.Caption+''');' + #13#10 + ' socketWhats.on(''enviaPushRoom'', function(msg){ ' + #13#10 + ' ajaxRequest('+FormRegion.JSName+', "pushWhats", ["return=" + JSON.stringify(msg)] ) ' + #13#10 + '}); ' + ' socketWhats.on(''enviaPushRoom'', (data)=>{ '+ ' var now = new Date;'+ ' var hora = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds(); '+ ' console.log(''socketWhats'',hora,JSON.stringify(data)); '+ ' });'; Self.UniSession.AddJS(xHTML);
-
I'm trying to use socket.io on unigui mobile, but it is not working, I would like some help, attached the source of an example with video, showing how to start the socket. The application was opened in 2 different tabs on the web to show that they communicate and the application was also opened in chrome on the desktop, switching to mobile where it worked, however opening the application in chrome on the phone does not work, the phone was mirrored on the computer to understanding.... Gravar_2020_02_12_10_40_17_623.mp4 HibridoSocket.rar