def run():
    client = Peer("127.0.0.1",
                  1012,
                  is_root=False,
                  root_address=ROOT_ADDRESS,
                  command_line=False)
    ClientGUIThread(client).start()
    client.run()
示例#2
0
from src.Peer import Peer

if __name__ == "__main__":
    server = Peer("192.168.202.221", 5356, is_root=True)
    server.start_user_interface()

    server.run()

from RunRoot import ROOT_ADDRESS
from src.Peer import Peer

if __name__ == "__main__":
    client = Peer("127.0.0.1", 1012, is_root=False, root_address=ROOT_ADDRESS)
    client.run()
示例#4
0
def run():
    server = Peer(ROOT_IP, ROOT_PORT, is_root=True)
    RootGUIThread().start()
    server.run()
示例#5
0
from src.Peer import Peer

root_address = ('127.0.0.5', 3536)

peer_address = ("127.0.0.4", 8014)
peer = Peer(peer_address[0],
            peer_address[1],
            is_root=False,
            root_address=root_address)

print(peer_address)

peer.run()


示例#6
0
from src.Peer import Peer

if __name__ == "__main__":
    side = input()
    if side == '1':
        port = int(input("port:"))
        server = Peer("127.000.000.001", port, is_root=True)
        server.run()
    else:
        server_port = int(input("server port:"))
        port = int(input("port:"))
        client = Peer("127.000.000.001",
                      port,
                      is_root=False,
                      root_address=("127.000.000.001", server_port))
        client.run()