【问题标题】:Android: Connect to socket server on emulator from physical deviceAndroid:从物理设备连接到模拟器上的套接字服务器
【发布时间】:2017-06-24 20:05:25
【问题描述】:

我正在尝试从物理设备连接到在我计算机上的 android 模拟器上运行的套接字服务器。我使用模拟器作为客户端并连接到我的设备没有问题,但是当我尝试做相反的事情时它不会连接。

【问题讨论】:

标签: android sockets networking android-emulator port


【解决方案1】:

使用以下命令使其在 MacOS Sierra 上运行

echo "
rdr pass inet proto tcp from any to any port 4444 -> 127.0.0.1 port 4444

" | sudo pfctl -ef -

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-07
    • 2021-04-21
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-10
    相关资源
    最近更新 更多