_pycache__ gelöscht

network Package mit __init__.py ausgestattet.
This commit is contained in:
2023-04-24 10:49:25 +02:00
parent 601b5de46d
commit c8ea31042e
7 changed files with 22 additions and 6 deletions

View File

@@ -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