update -4
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import socket
|
import socket
|
||||||
|
|
||||||
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
||||||
sock_.connect((socket.gethostname(),9337))
|
sock_.connect(("localhost",9337))
|
||||||
msg = sock_.recv(1024)
|
msg = sock_.recv(1024)
|
||||||
sock_.close()
|
sock_.close()
|
||||||
print(msg.decode("ascii"))
|
print(msg.decode("ascii"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import socket
|
import socket
|
||||||
|
|
||||||
host = socket.gethostname()
|
host = "localhost"
|
||||||
port = 9337
|
port = 9337
|
||||||
|
|
||||||
sock_ = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
|
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)
|
message = "\nThank you for connecting "+str(addr)
|
||||||
conn.send(message.encode("ascii"))
|
conn.send(message.encode("ascii"))
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user