Browse Source

hello

master
pouanideumassse68079 4 years ago
parent
commit
4d8a6a781e
2 changed files with 6 additions and 6 deletions
  1. 2
    2
      client.py
  2. 4
    4
      sever.py

+ 2
- 2
client.py View File

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") )
s.closed()
print(bytes.decode('utf-8') )
s.close()

+ 4
- 4
sever.py View File

s.bind((host , port)) s.bind((host , port))
s.listen() s.listen()
while True: while True:
(connection.addr )= s.accept()
print("verbindung von", addr)
msg= "Danke für das vorbeischauen!"
connection.send(msg.encode("utf-8"))
(connection, addr )= s.accept()
print('verbindung von', addr)
msg= 'Danke für das vorbeischauen!'
connection.send(msg.encode('utf-8'))
connection.close() connection.close()

Loading…
Cancel
Save