Zwischenstand Server- und Clientinitialisierung (Verbindung funktioniert noch nicht)

This commit is contained in:
Jonka Winkle 2018-10-15 16:15:38 +02:00
parent fbffbfe332
commit 7c4ae69817
14 changed files with 29 additions and 0 deletions

6
.idea/vcs.xml generated Normal file
View 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>

View File

@ -0,0 +1,15 @@
import socket
myserver = socket.socket()
hostname = myserver.gethostname()
port = 12345
myserver.bind((hostname, port))
myserver.listen()
while True:
(connection, addr) = myserver.accept()
msg_from_client = myserver.recv(1024)
in_capital_letters = msg_from_client.upper()
connection.send(in_capital_letters.encode('utf-8'))
connection.close()

View File

@ -0,0 +1,8 @@
import socket
myclient = socket.socket()
hostname = myserver.gethostname()
port = 12345
myclient.connect((hostname, port))