Hi for all, i'm having some trouble reading RPC stuff, i have reached the following conclusions that i want to explain to be corrected if necessary.
Starting from ntkd.py, where the daemon binds itself (NtkNode) on two server-sockets (UDP and TCP) using utils in rpc.py. The daemon launch Radar and Hook as microthreads. Radar sends (through BcastClient) a series of packets over broadcast address of the given network interfaces, thus he can know what are the neighbour and collect info based on them efficiency. The Radar store this info that can be used by other classes (P2P, Coord, etc) because its istance is passed through constructors. More he establish a connection thanks to TCPClient that returns a remote class. My question is: what is the type of the remote istance returned by TCPClient? f.e. at this line 234 radar.py: self.ntk_client[key] = rpc.TCPClient(ip_to_str(key)) this should be the NtkNode remote istance? so we can get radar, hook, map, p2p, etc of the remote node? There's something that is confusing me, at this line 275 radar.py: if self.ntk_client[ip].connected: NtkNode has no attribute 'connected'. And f.e. using the Neigh constructor, we pass 'ntk_client[key]' as second argument, that should be the 'idn', the neighbour id. 238 radar.py: Neigh(key, self.ntk_client[key], ... i'm having trouble discovering the object type of istances. thanks in advance, Francesco _______________________________________________ Netsukuku mailing list [email protected] http://lists.dyne.org/mailman/listinfo/netsukuku
