C # SanNiuSignal. DLL, which uses SOCKET to Implement Asynchronous Communication with JAVA, is open-source,

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.