update -4

This commit is contained in:
Jimmy Xiang
2020-12-04 22:11:58 +08:00
parent 90c850908e
commit 0965a281f5
2 changed files with 3 additions and 3 deletions

View File

@@ -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"))

View File

@@ -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()
conn.close()