简体   繁体   中英

PC to PC communication using Java

Is there such thing to communicate with 1 pc to another pc using JAVA. Concept is the same as Window Live Messenger but just want to know if there is such thing. If there is, can give some example


Regards

您可以尝试套接字通信,看看java.net包,在其中可以将一台PC视为服务器Socket,将另一台PC视为客户端Socket。

At the lowest level you are going to have to use TCP or UDP for the message exchange as Java doesn't support any other protocols (yet).

You may want to have a look at the JGroups project, it is mature library that can help you create networked applications. It's basic tutorial actually shows how to implement a simple chat application .

Regardless of the language you would probably use some standard protocol like TDC/IP or UDP to exchange data between instances of the application. And yes, Java certainly supports those.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM