diff --git a/04/client.py b/04/client.py index 65f1125..36fc32b 100644 --- a/04/client.py +++ b/04/client.py @@ -1,7 +1,7 @@ import socket sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM) -sock_.connect((socket.gethostname(),9337)) +sock_.connect(("localhost",9337)) msg = sock_.recv(1024) sock_.close() print(msg.decode("ascii")) diff --git a/04/server.py b/04/server.py index 547c4a9..827486c 100644 --- a/04/server.py +++ b/04/server.py @@ -1,6 +1,6 @@ import socket -host = socket.gethostname() +host = "localhost" port = 9337 sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM) @@ -15,4 +15,4 @@ print("Connection established with: ",str(addr)) message = "\nThank you for connecting "+str(addr) conn.send(message.encode("ascii")) -conn.close() \ No newline at end of file +conn.close()