{"id":18603808,"url":"https://github.com/dyzio18/linux_stream_server","last_synced_at":"2026-04-29T15:37:31.274Z","repository":{"id":128091708,"uuid":"120019295","full_name":"Dyzio18/Linux_stream_server","owner":"Dyzio18","description":"Asynchronous stream files using Unix socket and signals.","archived":false,"fork":false,"pushed_at":"2020-09-13T15:41:43.000Z","size":19448,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-18T13:32:50.096Z","etag":null,"topics":["c","file-streaming","linux","signals","socket","socket-client","socket-server","stream-processing","unix-socket"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dyzio18.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-02T18:57:58.000Z","updated_at":"2023-11-04T13:49:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"723dcce5-76a7-4ef3-8e32-12790da6bb03","html_url":"https://github.com/Dyzio18/Linux_stream_server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dyzio18/Linux_stream_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyzio18%2FLinux_stream_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyzio18%2FLinux_stream_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyzio18%2FLinux_stream_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyzio18%2FLinux_stream_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dyzio18","download_url":"https://codeload.github.com/Dyzio18/Linux_stream_server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dyzio18%2FLinux_stream_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32432364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","file-streaming","linux","signals","socket","socket-client","socket-server","stream-processing","unix-socket"],"created_at":"2024-11-07T02:15:37.007Z","updated_at":"2026-04-29T15:37:31.242Z","avatar_url":"https://github.com/Dyzio18.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux_stream_server\nStream text files using socket\n\n## GET STARTED:\n\n```\nmake\n\n```\n\n## LIVE:\n![epopeja_server_test_manual](https://github.com/Dyzio18/Linux_stream_server/blob/master/epopeja_server_test_manual.gif?raw=true)\n\nRun with test (test.sh): \n![epopeja_server_test_auto](https://github.com/Dyzio18/Linux_stream_server/blob/master/epopeja_server_test_auto.gif?raw=true)\n\n## Example:\n\nServer side:\n```\n./server.out -k store/Pan_Tadeusz -p .info\n```\nClient side:\n``` \n./client.out -r 10 -o 64 -f l -p .info -x 1 -s \u003cserver_pid\u003e\n```\n\n---\nEN\n\n## Run options:\n\nCustomer:\n```\n-s \u003cpid\u003e PID of the server process\n-r \u003csignal\u003e number of the RT signal to be used for the feedback\n-x \u003cint\u003e number of the book to be read\n-o \u003cint\u003e length of the interval between messages\n-f \u003cchar\u003e (fragment text)\nwith - words\nl - line\ns - words\n-p \u003cfile\u003e path to the advertisement board\n```\n\nServer:\n```\n-k \u003cdir\u003e directory where files for sharing are stored\n-p \u003cfile\u003e path to the file serving as the bulletin board.\n\n```\n\n## Case description\n\nCreate a server that makes books available to readers (clients). Clients can specify parameters such as sending interval, data format (line, word, letter), server response signal and book number. The connection is to be initiated by asynchronous signals. Clients learn about the allocated slot from the \"advertisement\" file. AF_UNIX sockets should be used.\n\n\n### How it works in few word\n\nTL;DR\nThe code is divided into two programs: Client and Server.\nThe server streams (provides) materials provided with parameters specified by the client.\nThe client receives and displays messages from the server.\n\n### Server\n\nThe server is listening to clients. Each client is a separate thread.\nThe server waits for a signal from the client. When the client sends the signal, the server will intercept the signal\nSIGRTMIN + 11 and completes the user registration process. Registration will fail\nonce the user limit is reached, it will be impossible to write the path to the array\npost or thread creation.\nThe server sends the RT signal (user specified) with the message of the registration result\nand the data needed to read the socket address from the bulletin board.\nThen the server creates a new thread that will serve the given user (server\npasses a data structure to the thread).\nIn the given thread, the file requested by the user is loaded to create a socket\nwith the correct path. The data streaming process itself is as follows:\n1. The thread is listening to the socket waiting for messages from the client\n2. When the thread receives the first (initiating) message, it will check to see if it is\n\"Random\" comparing the data with the client's PID.\n3. Sending properly portioned data (lines, words, characters) to the customer\n4. Check (decode) every client message with ROT13\n5. In case of an error, end of sending, failure to read or incorrect reading of data\nthe client closes the socket and thread.\n\n### Client\n\nThe client takes runtime arguments (getopd) then creates handles to signals and\nit sends the request (RT signal SIGRTMIN + 11) to the server with the user specified\nparameters. After the server accepts the request, the client reads the path from\n\"Bulletin board\" and creates sockets. Then, through these sockets will be held\nreading and sending confirmations to the server (encoded by ROT13).\n\n---\nPL\n\n## Run options:\n\nKlient:\n\n```\n\t-s \u003cpid\u003e PID procesu serwera\n\t-r \u003csignal\u003e numer sygnału RT, który ma być zastosowany przy komunikacie zwrotnym\n\t-x \u003cint\u003e numer księgi, którą ma odczytać\n\t-o \u003cint\u003e długość interwału pomiędzy komunikatami\n\t-f \u003cchar\u003e (fragmentacja tekstu)\n\t\t z - slowa\n\t\t l - linia \n\t\t s - slowa\n\t-p \u003cfile\u003e sciezka do tablicy ogloszeniowej\n```\n\nSerwer:\n```\n\t-k \u003ckatalog\u003e katalog, w którym są przechowywane pliki do udostępniania\n\t-p \u003cplik\u003e ścieżka do pliku pełniącego rolę tablicy ogłoszeniowej.\n\n```\n\n## Opis (PL)\n\n### Zadanie ( w skrócie): \n\nStwórz serwer który udostępnia księgi czytelnikom (klientom). Klienci mogą podać takie parametry jak interwał wysyłania, format danych (linia, słowo, litera), sygnał odpowiedzi serwera oraz numer księgi.Inicjalizacja połączenia ma odbywać sie za pomocą sygnałów asynchronicznych. Klienci dowiadują się o przydzielonym gnieździe na postawie pliku \"ogłoszeniowego\". Należy użyć socketów AF_UNIX.\n\n\n### Opis:\n\nKod dzieli się na dwa programy: Klient i Serwer.\nSerwer streamuje (udostępnia) materiały podane z określonymi przez klienta parametrami.\nKlient odbiera i wyświetla wiadomości od serwera.\n\n### Działanie (serwer):\n\nSerwer nasłuchuje na klientów. Każdy klient to osobny wątek. \nSerwer czeka na sygnał od klienta. Gdy klient wyśle sygnał, serwer przechwyci sygnał\nSIGRTMIN + 11 i dokonuje procesu rejestracji użytkownika. Rejestracja nie powiedzie się\ngdy limit użytkowników zostanie osiągnięty, niemożliwe będzie zapisanie ścieżki do tablicy\nogłoszeniowej lub utworzenie wątku.\nSerwer wysyła sygnał RT (określony przez użytkownika) z wiadomością o wyniku rejestracji\ni danymi potrzebnymi do odczytania adresu socketa z tablicy ogłoszeniowej.\nNastępnie serwer tworzy nowy wątek który będzie obsługiwał danego użytkownika (serwer\nprzekazuje do wątku strukturę z danymi).\nW danym wątku następuje wczytanie pliku żądanego przez użytkownika, utworzenia socketa\nz odpowiednią ścieżką. Sam proces streamingu danych jest następujący:\n1. Wątek nasłuchuje socket oczekując wiadomości od klienta\n2. Gdy wątek odbierze pierwszą wiadomość (inicjującą) sprawdzi czy nie jest ona\n“przypadkowa” porównując dane z PIDem klienta.\n3. Wysyłanie odpowiednio porcjowanych danych (linie, słowa, znaki) do klienta\n4. Sprawdzenie (odkodowanie) każdej wiadomości klienta za pomocą ROT13\n5. W przypadku błędu, końca wysyłania, nieodczytania lub błędnego odczytania danych\nprzez klienta następuje zamknięcie socketu i wątku.\n\n### Działanie (klient):\n\nKlient pobiera argumenty uruchomieniowe (getopd) następnie tworzy uchwyty do sygnałów i\nwysyła żądanie (sygnał RT SIGRTMIN + 11) do serwera z podanymi przez użytkownika\nparametrami. Po pozytywnym rozpatrzeniu żądania przez serwer klient odczytuje ścieżkę z\n“tablicy ogłoszeniowej” i tworzy sockety. Następnie przez te sockety odbywać będzie się\nczytanie oraz wysyłanie potwierdzeń do serwera (zakodowanych przez ROT13).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyzio18%2Flinux_stream_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyzio18%2Flinux_stream_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyzio18%2Flinux_stream_server/lists"}