server
This commit is contained in:
parent
97c7f944f5
commit
1f09919ed7
@ -7,9 +7,10 @@ host = socket.gethostname()
|
|||||||
port = 12346
|
port = 12346
|
||||||
|
|
||||||
s.connect((host, port))
|
s.connect((host, port))
|
||||||
s.send(eingabe)
|
s.send(eingabe.encode('utf-8'))
|
||||||
bytes = s.recv(1024)
|
#bytes = s.recv(1024)
|
||||||
print(bytes.decode('utf-8'))
|
#print(bytes.decode('utf-8'))
|
||||||
print('Receipt')
|
print('Gesendet')
|
||||||
|
msg3 = s.recv(1024)
|
||||||
|
|
||||||
s.close()
|
s.close()
|
@ -10,6 +10,9 @@ 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!"
|
msg2 = connection.recv(1024)
|
||||||
connection.send(msg.encode('utf-8'))
|
new_msg2 = msg2.decode('utf-8') .upper()
|
||||||
|
print(new_msg2)
|
||||||
|
connection.send(new_msg2.encode('utf-8'))
|
||||||
|
#connection.send(msg.encode('utf-8'))
|
||||||
connection.close()
|
connection.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user