简体   繁体   English

如何使用TCP套接字发送鼠标坐标

[英]How to send mouse coordinate using TCP socket

我想使用TCP socket将鼠标坐标发送到android应用程序。这是执行此操作的最简单方法-应该一一发送,还是可以在单个数据包中发送两个坐标。

As long as you can keep track of which value represents which coordinate any method should be fine. 只要您可以跟踪哪个值代表哪个坐标,任何方法都可以。 Note that the concept of a packet makes little sense in applications using TCP as the protocol allows fragmentation, but ensures all data will arrive and in proper order. 请注意,数据包的概念在使用TCP的应用程序中意义不大,因为该协议允许分段,但确保所有数据都将以正确的顺序到达。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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