fffff
This commit is contained in:
commit
8f013416bf
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>
|
12
client.py
Executable file
12
client.py
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
import socket
|
||||||
|
|
||||||
|
s = socket.socket()
|
||||||
|
host = socket.gethostname()
|
||||||
|
port = 4444
|
||||||
|
|
||||||
|
eingabe = input ("Bitte etwas eingeben:")
|
||||||
|
|
||||||
|
s.connect((host, port))
|
||||||
|
bytes = s.recv(1024)
|
||||||
|
print(bytes.decode("utf-8"))
|
||||||
|
s.close()
|
14
server.py
Executable file
14
server.py
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
import socket
|
||||||
|
|
||||||
|
s = socket.socket()
|
||||||
|
host = socket.gethostname()
|
||||||
|
port = 4444
|
||||||
|
s.bind((host, port))
|
||||||
|
s.listen()
|
||||||
|
|
||||||
|
while True:
|
||||||
|
(connection, addr) = s.accept()
|
||||||
|
print("Verbindung von ", addr)
|
||||||
|
msg = "Danke für das Vorbeischauen!"
|
||||||
|
connection.send(msg.encode("utf-8"))
|
||||||
|
connection.close()
|
Loading…
x
Reference in New Issue
Block a user