Zwischenstand Server- und Clientinitialisierung (Verbindung funktioniert noch nicht)
This commit is contained in:
1 parent
fbffbfe332
commit
7c4ae69817
14 files changed
+29
No files matched your search
Generated
+6
@@ -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>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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()
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import socket
|
||||
|
||||
myclient = socket.socket()
|
||||
hostname = myserver.gethostname()
|
||||
port = 12345
|
||||
|
||||
myclient.connect((hostname, port))
|
||||
|
||||
Reference in new issue
Block a user