Looking to develop chat server that works in HTML5? Technology available?

百般思念 提交于 2019-12-24 04:13:04

问题


I was a big fan of AIM and live chat/buddy lists back in the day. With the rise of HTML5 and its use becoming more common in modern browsers, I'd like to develop an HTML5 messaging system.

What technologies do I have to look up? At the start, I won't care about the design (CSS), just functionality.

I'll most likely have a standard registration and store users in a MySQL Database. Additionally, "friends" will also easily be stored in a database, populating a user's buddy list based on which user ID's he/she has marked as "friend".

The actual server and client connectivity is what most interests me. Is this technology available for HTML5 yet? Point me in the right direction and I'll be good to go!


回答1:


For the chat, you would probably like to look in to Websockets (as you talk about HTML5).

There are also examples like this where NodeJS is used. To use node, you would have to run a node-server. For examples and more info: nodejs.org




回答2:


I think the websockets API will be your first port of call for a messaging app in HTML5. You'll be wanting the server to notify the client rather than the client poll or rely on callbacks and this would be the start i think.

However, I don't think this is very well supported in even the most modern browser. In fact i believe firefox and opera have pulled support because of security concerns.

I haven't done any work in this myself but just though it looked interesting stuff. So I guess I just wish you luck with your dev. Exciting cutting edge stuff I think.



来源:https://stackoverflow.com/questions/8546042/looking-to-develop-chat-server-that-works-in-html5-technology-available

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!