Jump to content


Photo

socket.io / node.js simple chat sample


  • Please log in to reply
No replies to this topic

#1 delphidude

delphidude

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 202 posts
  • LocationNorway

Posted 21 May 2018 - 10:33 AM

Hi,

 

Attached is a simple Unigui test project using websockets with

a socket.io server running on a node.js server, and a pure

JS websocket client running in a UniHTMLFrame.

 

This is based on the example at https://socket.io/get-started/chat/

and actually worked right out of the box, only had to add the

connection url http://localhost:3000/for the client and a few

CSS mods.

 

I will try to use this for my calendar project, for sync

between logged on clients.

 

I was able to use redis pub/sub for sync of external

processes like cash register, but not for calendar sync,

as that must be initiated from the browser client,

and redis clients cannot do http calls.

Attached Files


  • 3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users