This is probably a newb question. How does a chat server like PHPFreeChat Works? I’ve always had the impression that a server must be a windows service which manages TCP Connections. However for PHPFreeChat, there is no service.
Can someone give a general idea? Can’t seem to find this information even in the Chat websites
Thanks!
As mentioned above, the messages are usually stored in some means of permanent storage like a text file or database. In simple ones anyway, the page polls the storage at a specific interval (500ms) and appends the new messages to the chat window.
The server is polled using AJAX which can send form variables using Javascript so it can receive the server response without reloading the page.