Cordova: Create socket server

纵然是瞬间 提交于 2019-12-08 01:22:18

问题


I want to make a chat mobile app with corodva, I want to transmit messages from phone to another phone directly without a server in the middle. So I'm thinking about a socket communication throught a socket server on one of the phones and exchanging messages directly. Is there a way to create a socket server with cordova like in Java ServerSocket ?


回答1:


Yes, there is a way, use the chrome socket plugin:

cordova-plugin-chrome-apps-socket

The point is, the documentation is not very easy, but the plugin is working very well.

I'm using it for a private app Rezepte. Sorry, the site is not finished.



来源:https://stackoverflow.com/questions/31351164/cordova-create-socket-server

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