network fifo

This commit is contained in:
Kuba 2023-11-16 14:53:40 +01:00 committed by GitHub
parent b4c92547da
commit d424c96eaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1,3 +1,4 @@
#this is for pifmrds, if you have a service that interacts with the pipe from the network, you can use this, just make sure you `mkfifo tctl` and pass the `-ctl tctl` to pifmrds :)
import socket import socket
import os import os
import threading import threading
@ -12,8 +13,6 @@ server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind((server_ip, server_port)) server.bind((server_ip, server_port))
server.listen(5) # Allow multiple connections server.listen(5) # Allow multiple connections
print("R27 NRDSOS 1.1 (THIS IS AN INTERNAL APP USED IN R27'S INTERNAL RDS SERVICE)")
print("Listening for incoming connections...") print("Listening for incoming connections...")
def handle_client(client_socket): def handle_client(client_socket):