From c8ea31042ec560914b71104d9637ae1d4cdbdc8c Mon Sep 17 00:00:00 2001 From: Raspithek Date: Mon, 24 Apr 2023 10:49:25 +0200 Subject: [PATCH] =?UTF-8?q?=5Fpycache=5F=5F=20gel=C3=B6scht=20network=20Pa?= =?UTF-8?q?ckage=20mit=20=5F=5Finit=5F=5F.py=20ausgestattet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- teil13/.gitignore | 2 ++ teil13/fibclient.py | 9 +++++++-- teil13/fibserver.py | 4 ++-- teil13/network/__init__.py | 2 ++ .../network/__pycache__/__init__.cpython-39.pyc | Bin 141 -> 0 bytes teil13/network/__pycache__/const.cpython-39.pyc | Bin 256 -> 0 bytes teil13/network/const.py | 11 +++++++++-- 7 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 teil13/.gitignore delete mode 100644 teil13/network/__pycache__/__init__.cpython-39.pyc delete mode 100644 teil13/network/__pycache__/const.cpython-39.pyc diff --git a/teil13/.gitignore b/teil13/.gitignore new file mode 100644 index 0000000..c7fb3aa --- /dev/null +++ b/teil13/.gitignore @@ -0,0 +1,2 @@ +./__pycache__ +./network/__pycache__/* diff --git a/teil13/fibclient.py b/teil13/fibclient.py index 35a9744..5a1d802 100644 --- a/teil13/fibclient.py +++ b/teil13/fibclient.py @@ -2,14 +2,19 @@ # fibclient.py import socket import time -from network.const import __ADDRESS__ +#from network.const import __ADDRESSREMOTE__ +#from network.const import __ADDRESSLOCAL__ +from network import __ADDRESSLOCAL__ DISCONNECT_MESSAGE = "!DISCONNECT" # Verbindung herstellen def connect(): client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - client.connect(__ADDRESS__) +# für fibserver auf einem Remote-Pi +# client.connect(__ADDRESSREMOTE__) +# für fibserver auf lokalem Pi (import oben beachten!) + client.connect(__ADDRESSLOCAL__) return client # msg senden diff --git a/teil13/fibserver.py b/teil13/fibserver.py index f5d2229..2302ce9 100755 --- a/teil13/fibserver.py +++ b/teil13/fibserver.py @@ -2,13 +2,13 @@ import socket import threading -from network.const import __ADDRESS__ +from network import __ADDRESSLOCAL__ # Server-Socket aufbauen server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #Socket an unsere Server-Adresse binden -server.bind(__ADDRESS__) +server.bind(__ADDRESSLOCAL__) # Set mit den verbundenen Clients clients = set() diff --git a/teil13/network/__init__.py b/teil13/network/__init__.py index 8b13789..b024592 100644 --- a/teil13/network/__init__.py +++ b/teil13/network/__init__.py @@ -1 +1,3 @@ +from .const import __ADDRESSLOCAL__ +from .const import __ADDRESSREMOTE__ diff --git a/teil13/network/__pycache__/__init__.cpython-39.pyc b/teil13/network/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 4eef26b46017946fc516a532d5bdfc7fd041a9f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 141 zcmYe~<>g`kf*B|DQW$~sV-N=!fCL?YxR?b-}jUXTZ diff --git a/teil13/network/__pycache__/const.cpython-39.pyc b/teil13/network/__pycache__/const.cpython-39.pyc deleted file mode 100644 index ad3ffcbd1862f37b88ee262218699cad13f540cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 256 zcmYe~<>g`kf@Ke_Qw{;?#~=F{UysU;<+1g$xTB zqgYZ|QW?{jqF7THgBdiLUjo%K_+`$LWMI%_yTw+VpPZdq62%c8AK)Jp5+8qyH$Al^ zBfq#LsWLAyH}w`blndfSamB|6y9R~11_9M^$HzOmxCFTd2gk>+WGG?-nhGX<>Fa0Y z=ceixWa_79mgpB$0!_=yE-fn7FG