手机与PC之间如何通信?

发布于 2024-10-16 21:21:31 字数 1437 浏览 10 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

影子是时光的心 2024-10-23 21:21:31

为此,您需要编写两个单独的软件:

1)服务器

2)客户端

我建议您在PC上安装服务器,在手机上安装客户端。

客户端将与服务器建立 TCP 连接,并且能够可靠地发送消息。收到来自客户端(电话)的消息后,您的服务器(PC)将采取相应的行动。

您可以参考java文档找到两个关于创建TCP服务器和客户端的简单示例,这些应该非常有帮助。 示例链接

To do that you would need to write two separate pieces of software:

1) A Server

2) A Client

I would suggest you install the server on the PC and the client on the phone.

The client would establish a TCP connection to the server and would be able to send messages reliably. Upon receiving the messages from the client (phone) your server (pc) will act accordingly.

You can refer to the java documentation to find two simple samples about creating TCP servers and clients and these should be very helpful. Example Link

浅唱ヾ落雨殇 2024-10-23 21:21:31

你可以使用手机的蓝牙,并用java为你的电脑开发一个服务器。

我已经完成了这个过程。

You can use the bluetooth of the mobile, and develop a Server in java for your pc.

I have done this process.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文