C # SanNiuSignal. DLL, which uses SOCKET to Implement Asynchronous Communication with JAVA, is open-source,
Hello, some time ago, C #'s SanNiuSignal. DLL has been open-source; some users need JAVA version SanNiuSignal; now they can only take out the semi-finished products for their use, and then gradually improve;
Currently, JAVA has implemented two-way text communication with C #. Next we will introduce this cross-language communication technology in detail ............
Description of the use of each version and: 1 C # SanNiuSignal. DLL specific address: http://www.cnblogs.com/SanNiuSignal/p/4179068.html 2: JAVA version due to imperfect can only join the QQ group: 426414437 to the group File Download
The SOCKET of the Communication System in JAVA only involves the client, so I am using the synchronous TCP technology. The protocol for communication with the server is based on SanNiuSignal. the client protocol in DLL is copied. Here I have made two demos, one of which is pure JAVA and the other can be used on Android phones, the following describes some notes for these two demos. Before using these two demos, you must first use SanNiuSignal of C. DLL open a server, the use of this method in http://www.cnblogs.com/SanNiuSignal/p/4179068.html has a detailed introduction
I: first, let's take a look at the JAVA version of the client first open the server to start the TCP connection and then start the JAVA client to communicate. This demo I set the automatic sending of information to the server. You need to add additional control according to your own to be modified.
2: The Android client only extends two interfaces based on the original JAVA to facilitate calls:
When using Android, pay attention to the IP Address: I cannot enter 127.168.0.1 or so. I still don't know why. Maybe it's because I didn't add any networks. I can also tell you why:
If you are not doing well, don't spray it. The technology is limited ...... if you have any questions, join the QQ group: 426414437.