hello
This commit is contained in:
parent
c0ec1db1a4
commit
4d8a6a781e
@ -4,5 +4,5 @@ host=socket.gethostname()
|
|||||||
port= 12345
|
port= 12345
|
||||||
s.connect((host , port))
|
s.connect((host , port))
|
||||||
bytes= s.recv(1024)
|
bytes= s.recv(1024)
|
||||||
print(bytes.decode("utf-8") )
|
print(bytes.decode('utf-8') )
|
||||||
s.closed()
|
s.close()
|
8
sever.py
8
sever.py
@ -5,8 +5,8 @@ port = 12345
|
|||||||
s.bind((host , port))
|
s.bind((host , port))
|
||||||
s.listen()
|
s.listen()
|
||||||
while True:
|
while True:
|
||||||
(connection.addr )= s.accept()
|
(connection, addr )= s.accept()
|
||||||
print("verbindung von", addr)
|
print('verbindung von', addr)
|
||||||
msg= "Danke für das vorbeischauen!"
|
msg= 'Danke für das vorbeischauen!'
|
||||||
connection.send(msg.encode("utf-8"))
|
connection.send(msg.encode('utf-8'))
|
||||||
connection.close()
|
connection.close()
|
Loading…
x
Reference in New Issue
Block a user