问题
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