minicap
minicap copied to clipboard
AF_UNIX socket server
In the SimpleServer.cpp file, the AF_UNIX socket is created. Why not create AF_INET socket instead?
- It’s much easier because the port can’t be in use by anything else
- Less overhead
- Listening on ports tends to make USB tethering unusable on some devices
- Better isolation; regular apps running on the device cannot connect to the abstract socket, and it cannot be connected to over the network either
- Leaves all ports free for other programs to use
- Some devices (e.g. samsung) don’t let you create regular socket files in /data/local/tmp so socket files can’t be used
Why are you asking though?
Thank you ! I have a deeper understanding of this. in my project, the minicap is used to takes screen capture. From the perspective of project architecture, Data exchange with server is based on WIFI, not adb usb or adb wifi. In addition, The processor in the special device is relatively low-end, resulting in very unstable screen, so I have the idea of changing to AF_INET. Now I have made some modifications, ready to test and see the effect. If the result is not good, we may need to modify the project architecture.
谢谢 ! 我对此有了更深刻的理解。在我的项目中,minicap用于进行屏幕捕获。从项目架构的角度来看,与服务器的数据交换基于WIFI,而不是adb usb或adb wifi。另外,特殊设备中的处理器相对较低,导致屏幕非常不稳定,所以我有想法改为AF_INET。 现在我做了一些修改,准备测试并看到效果。如果结果不好,我们可能需要修改项目架构。
你好,打扰您了,请问您现在有没有修改AF_INET实现通过服务器直接了链接到手机呢?
谢谢 ! 我对此有了更深刻的理解。在我的项目中,minicap用于进行屏幕捕获。从项目架构的角度来看,与服务器的数据交换基于WIFI,而不是adb usb或adb wifi。另外,特殊设备中的处理器相对较低,导致屏幕非常不稳定,所以我有想法改为AF_INET。 现在我做了一些修改,准备测试并看到效果。如果结果不好,我们可能需要修改项目架构。
你好,打扰您了,请问您现在有没有修改AF_INET实现通过服务器直接了链接到手机呢?
你好,目前这个功能已经实现了,并运用于实际项目中了。