Oct-18-2018, 08:51 AM
I want to establish a connection between 2 diffrent mechies.
heres my code
it says No connection could be made becouse the target machine actively refused it.
what?
iv tryed a vpn btw... and it still desent work?
help?
heres my code
server: #!/usr/bin/python # This is server.py file import socket # Import socket module s = socket.socket() # Create a socket object host = socket.gethostname() # Get local machine name port = 14321 # Reserve a port for your service. s.bind((host, port)) # Bind to the port s.listen(5) while True: c, addr = s.accept() # Establish connection with client. print ("Got connection from", addr) msg = input("what do you want to send?\n") c.send(msg) client: #!/usr/bin/python # This is client.py file import socket # Import socket module s = socket.socket() # Create a socket object host = socket.gethostname() # Get local machine name port = 14321 # Reserve a port for your service. while True: s.connect((host, port)) print (s.recv(1024))HEEEELP
it says No connection could be made becouse the target machine actively refused it.
what?
iv tryed a vpn btw... and it still desent work?
help?