Websockets on windows server

Asked

Viewed 30 times

0

All right, guys,
I have already given a good read in several web tutorials related to WebSockets, I thought it was very cool and wanted to do some chat tests for learning. The problem is that in all the tutorials I’ve seen (even in the questions here at sop) only talk about using Node.js on the server side, or run some file(php, the language I use) via command line, which I don’t have access to because I use a Windows Uol reseller.

Is there any way to use this technology on my server without the above requirements (something like javascript and php without running via the command line)? I’ve researched a lot but so far no light, which made me very discouraged because it seems to be something worth using in everyday life.

1 answer

1


assuming you are using socket.io, synchronous communication between server and browser requires Node.js

In short, when you use PHP, the browser prompts for the server’s content and never the other way around; while Node.js can by server event communicate with the browser at any time, including for other visitors' events (when performing a broadcast, for example, whenever a new person enters the room).

Okay? You can even use PHP to store items in the database, process data, however, the same real-time bidding is JS client >< Node.js

I hope I’ve helped

  • I understood, but what a pity I won’t be able to use because of the server I use. I will have to use the longpolling even the websocket seem more recommended.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.