使用 socket.io 的离子聊天应用程序(如何让我的用户加入聊天。socket.io)

ionic chat application using socket.io(how to make my user to join chat.socket.io)

我正在尝试使用 socket.io 来创建聊天应用程序。

我已经审阅了本教程 https://www.sitepoint.com/using-socket-io-and-cordova-to-create-a-real-time-chat-app/

我无法连接到公共服务器看这里http://chat.socket.io/

i would like to create an app where all the user enter the name and connect the chat.socket.io group. what is the server host they are using how can i connect my app users to join the chat.socket.io.

问题是我无法将我的用户连接到 http://chat.socket.io/

更新:

举个例子:

In my app i am having number of users and i have button called chat when the user clicked the chat button he should enter this page http://chat.socket.io/ and i need a exit button to exit the chat

To connect with server we need some thing like this "http://54.200.176.147:8888/socket.io/socket.io.js" is there any port available for chat.socket.io please let me know

我宁愿建议您设置自己的服务器而不是尝试连接到 http://chat.socket.io您可以使用 nodejs 设置自己的服务器并表达、收听和广播聊天消息。

建议您查看此 socket io chat link for setting up the server and trying out basic chat. You can also download the server setup from my github page 并按照聊天 link 说明 运行 在端口 3000 上进行监听。希望对您有所帮助