Skip to content

Commit 0965a28

Browse files
committed
update -4
1 parent 90c8509 commit 0965a28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

04/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import socket
22

33
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
4-
sock_.connect((socket.gethostname(),9337))
4+
sock_.connect(("localhost",9337))
55
msg = sock_.recv(1024)
66
sock_.close()
77
print(msg.decode("ascii"))

04/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import socket
22

3-
host = socket.gethostname()
3+
host = "localhost"
44
port = 9337
55

66
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
@@ -15,4 +15,4 @@
1515

1616
message = "\nThank you for connecting "+str(addr)
1717
conn.send(message.encode("ascii"))
18-
conn.close()
18+
conn.close()

0 commit comments

Comments
 (0)