Delete CLRadio-Reciever.py
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
import socket
|
|
||||||
|
|
||||||
def run_server():
|
|
||||||
print("=" * 80)
|
|
||||||
print("CLRadio Reciever Version A-1 | by P7MJ")
|
|
||||||
print("-" * 80)
|
|
||||||
host = '0.0.0.0' # Listen on all available interfaces
|
|
||||||
port = 443
|
|
||||||
|
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
|
||||||
s.bind((host, port))
|
|
||||||
s.listen(1)
|
|
||||||
print(f"Listening on {host}:{port}.")
|
|
||||||
|
|
||||||
c, addr = s.accept()
|
|
||||||
print(f"Connection established from {str(addr)}")
|
|
||||||
while True:
|
|
||||||
data = c.recv(1024).decode()
|
|
||||||
if not data:
|
|
||||||
break
|
|
||||||
print(f"{str(addr)}: {data}")
|
|
||||||
# Optional: send a response back
|
|
||||||
# c.send(data.encode())
|
|
||||||
c.close()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
run_server()
|
|
||||||
Reference in New Issue
Block a user