Module Import alias alias alias alias ImportFrom alias FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Str attr SubscriptLoad Call AttributeLoad NameLoad attr Str Slice Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Return TupleLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam defaults body While NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMult Num Num If CompareGt BinOpSub Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad NameLoad attr Str If CompareGt BinOpSub Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr BinOpMult Num Num body If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Delete NameDel Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Break AugAssignAdd NameStore NameLoad If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Continue Expr Yield SubscriptLoad NameLoad Slice Num NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd BinOpAdd Call NameLoad Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Assign NameStore BinOpAdd Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr NameLoad If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Expr Call AttributeLoad NameLoad attr Str If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Pass If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Str Return orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If CompareIn SubscriptLoad NameLoad Slice Num Num ListLoad Str body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Expr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad Str TupleLoad Str Num Expr Call AttributeLoad NameLoad attr CompareEq Call NameLoad Str TupleLoad Str Num decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A gevent gevent.queue socket time node Node addr_2_host_port N/A N/A addr N/A N/A N/A host N/A N/A : join N/A N/A N/A addr split : N/A -1 N/A port N/A N/A N/A addr split : N/A -1 N/A N/A host N/A int port N/A Connect N/A N/A finger set_handler addr N/A N/A N/A s N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A s connect N/A addr_2_host_port addr N/A N/A Protocol s addr finger set_handler N/A Protocol N/A N/A __init__ N/A N/A self conn addr finger set_handler N/A N/A N/A N/A self remote_addr addr N/A N/A self remote_conn conn N/A N/A self finger finger N/A N/A self Node None N/A N/A self set_handler set_handler N/A N/A self recv_gen N/A N/A self recv_generator conn N/A N/A self send_queue N/A N/A N/A gevent queue Queue N/A N/A N/A self host N/A self port N/A addr_2_host_port addr N/A N/A N/A gevent spawn N/A self local_handle N/A N/A N/A gevent spawn N/A self net_handle N/A N/A N/A gevent spawn N/A self check_alive N/A N/A N/A self send N/A UIDRESP  N/A N/A N/A self finger self uid N/A check_alive N/A N/A self N/A N/A N/A True N/A N/A N/A N/A gevent sleep N/A 60 1 N/A N/A N/A N/A N/A time time N/A N/A self Node last_seen 60 N/A N/A N/A N/A self send PING N/A N/A N/A N/A N/A time time N/A N/A self Node last_seen N/A 60 5 N/A N/A N/A self Node N/A N/A N/A N/A N/A self finger remove N/A self Node N/A self N/A N/A send N/A N/A self msg N/A N/A N/A N/A N/A N/A self send_queue put msg N/A recv_generator N/A N/A self conn N/A N/A N/A msg N/A True N/A N/A new_data N/A N/A conn recv 32 N/A N/A new_data N/A N/A N/A N/A N/A self finger remove N/A self Node N/A N/A N/A N/A self remote_conn close N/A N/A msg new_data N/A N/A | msg N/A N/A N/A length remainder N/A N/A msg split | 1 N/A length N/A int length N/A N/A N/A len remainder length N/A N/A N/A N/A N/A remainder N/A 0 length N/A msg N/A remainder N/A length N/A len remainder N/A net_handle N/A N/A self N/A N/A N/A Handle remote network messages N/A msg N/A self recv_gen N/A N/A N/A N/A self net_msg_handle msg N/A local_handle N/A N/A self N/A N/A N/A Handle requests for messages to be sent N/A item N/A self send_queue N/A N/A N/A N/A self net_msg_send item N/A net_msg_send N/A N/A self item N/A N/A N/A Clean messages so they don't mess up the protocol N/A msg N/A N/A N/A str N/A len item | item N/A N/A N/A N/A self remote_conn send msg N/A net_msg_handle N/A N/A self msg N/A N/A N/A N/A N/A msg N/A 0 7 N/A UIDRESP N/A N/A N/A _ uid N/A N/A msg split 1 N/A N/A N/A self Node None N/A N/A N/A self Node N/A Node uid N/A self host N/A self port self N/A N/A N/A N/A self finger add N/A self Node N/A N/A N/A msg N/A 0 6 N/A UIDREQ N/A N/A resp N/A UIDRESP  N/A N/A N/A self finger self uid N/A N/A N/A self send resp N/A N/A N/A msg N/A 0 4 N/A PING N/A N/A N/A N/A self send PONG N/A N/A N/A msg N/A 0 4 N/A PONG N/A N/A N/A N/A N/A self Node None N/A N/A N/A N/A self send UIDREQ N/A N/A N/A N/A N/A N/A self Node seen N/A N/A N/A msg N/A 0 9 N/A REQ_LEVEL N/A N/A N/A _ level N/A N/A msg split 1 N/A node N/A N/A N/A self finger get_node_from_level N/A int level N/A N/A self Node uid N/A node N/A N/A resp N/A N/A N/A N/A N/A RESP_LEVEL  N/A str N/A node uid N/A self host : N/A str N/A self port N/A N/A N/A self send resp N/A N/A N/A msg N/A 0 10 N/A RESP_LEVEL N/A N/A N/A _ uid addr N/A N/A msg split 1 N/A N/A Connect N/A self finger N/A self set_handler addr N/A N/A N/A N/A self set_handler handle_msg self msg N/A __del__ N/A N/A self N/A N/A N/A N/A N/A N/A self send_queue put StopIteration N/A N/A N/A N/A self remote_conn shutdown N/A N/A N/A N/A self remote_conn close N/A N/A LoopBackProtocol N/A Protocol N/A N/A 
    Protocol for talking to yourself
     __init__ N/A N/A self addr finger set_handler N/A N/A N/A N/A self remote_addr addr N/A N/A self finger finger N/A N/A self Node None N/A N/A self set_handler set_handler N/A N/A self recv_gen N/A N/A N/A gevent queue Queue N/A N/A self send_queue N/A N/A N/A gevent queue Queue N/A N/A N/A self host N/A self port N/A addr_2_host_port addr N/A N/A N/A gevent spawn N/A self local_handle N/A N/A N/A gevent spawn N/A self net_handle N/A N/A N/A gevent spawn N/A self check_alive N/A N/A N/A self send N/A UIDRESP  N/A N/A N/A self finger self uid N/A net_msg_send N/A N/A self item N/A N/A N/A Send messages locally so we can talk to ourselves N/A N/A N/A N/A self recv_gen put item N/A N/A N/A unittest TestProtocol N/A N/A unittest TestCase N/A testaddr N/A N/A self N/A N/A N/A N/A N/A self assertTrue N/A N/A addr_2_host_port 127.0.0.1:80 N/A 127.0.0.1 80 N/A N/A N/A self assertTrue N/A N/A addr_2_host_port fe80::1234:80 N/A fe80::1234 80 N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main