How to connect to wifi devices using Java?

限于喜欢 提交于 2019-12-06 09:56:37

问题


I want to know how to establish connection in Java between devices within wifi range.

Thanks, in advance.


回答1:


To establish a connection between two devices over a network (WiFi, cable, etc...) you need to write 2 pieces of software:

1) A server: which waits for connections

2) A client: which initiates a connection to the server

Once the client initiates a TCP connection then the devices are connected and you can send data and messages between them.

Here: Java Sockets

Here's a COMPLETE step by step tutorial on how to write a chat application: Client/Server Pair



来源:https://stackoverflow.com/questions/5877450/how-to-connect-to-wifi-devices-using-java

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