我正在尝试写一个应用程序来发现网络中的主机(就像network Discovery by Aubort),我有一个问题:当android手机发送广播ping:-Do广播ping到达无线路由器(或接入点!)它会为电话广播它们吗?然后无线路由器接收并响应ping-echo-reply给手机?-If而不是手机必须自己广播ping,我想不确定它的信号质量是否和无线路由器一样好。那么如何确保手机在网络中进行了完整的扫描?!(为我糟糕的英语>.<道歉)
我用python的SocketServer模块构建了一个套接字服务器:
import SocketServer
class MyTCPHandler(SocketServer.BaseRequestHandler):
def handle(self):
# self.request is the TCP socket connected to the client
self.data = self.request.recv(1024).strip()
print "{} wrote:".format(self.clie