teil13
This commit is contained in:
1
teil13/network/__init__.py
Normal file
1
teil13/network/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
|
BIN
teil13/network/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
teil13/network/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
teil13/network/__pycache__/const.cpython-39.pyc
Normal file
BIN
teil13/network/__pycache__/const.cpython-39.pyc
Normal file
Binary file not shown.
10
teil13/network/code.py
Normal file
10
teil13/network/code.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def receive(conn):
|
||||
msg = conn.recv(64).decode('utf-8')
|
||||
|
||||
return msg
|
||||
|
||||
def send(client, msg):
|
||||
message = msg.encode('utf-8')
|
||||
client.send(message)
|
||||
|
||||
|
12
teil13/network/const.py
Normal file
12
teil13/network/const.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#network/const.py
|
||||
|
||||
import socket
|
||||
|
||||
# TCP Port
|
||||
__PORT__ = 6554
|
||||
|
||||
#Server-IP
|
||||
__SERVER__ = socket.gethostbyname(socket.gethostname())
|
||||
|
||||
# Server-Adresse (IP,Port)
|
||||
__ADDRESS__ = (__SERVER__,__PORT__)
|
Reference in New Issue
Block a user