letztes commit
This commit is contained in:
parent
775ce391d5
commit
b707eed9ce
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
15
client.py
15
client.py
@ -3,12 +3,17 @@ import socket
|
|||||||
s = socket.socket()
|
s = socket.socket()
|
||||||
host = socket.gethostname()
|
host = socket.gethostname()
|
||||||
port = 12345
|
port = 12345
|
||||||
s.bind((host,port))
|
|
||||||
s.listen()
|
|
||||||
|
eingabe = input("gibt etwas ein")
|
||||||
|
print(eingabe)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
(connection, addr) = s.accept()
|
(connection, addr) = s.accept()
|
||||||
print("Verdindung von", addr)
|
connection.send(eingabe.encode('utf-8'))
|
||||||
msg= "Danke für ds vorbeischauen"
|
|
||||||
connection.send(msg.encode('utf-8'))
|
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,8 @@ import socket
|
|||||||
s = socket.socket()
|
s = socket.socket()
|
||||||
host = socket.gethostname()
|
host = socket.gethostname()
|
||||||
port = 12345
|
port = 12345
|
||||||
#eingabe = "hello"
|
s.bind((host,port))
|
||||||
|
s.listen()
|
||||||
|
|
||||||
s.connect((host, port))
|
s.connect((host, port))
|
||||||
bytes = s.recv(1024)
|
bytes = s.recv(1024)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user