{"id":18391748,"url":"https://github.com/moscicky/computer-networks-gg","last_synced_at":"2025-08-13T18:14:31.099Z","repository":{"id":83328308,"uuid":"155424922","full_name":"moscicky/computer-networks-gg","owner":"moscicky","description":"Repository for Computer Networks project","archived":false,"fork":false,"pushed_at":"2019-01-02T18:47:02.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-02T22:54:13.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/moscicky.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-10-30T17:04:06.000Z","updated_at":"2019-01-02T18:47:03.000Z","dependencies_parsed_at":"2023-03-01T10:45:48.221Z","dependency_job_id":null,"html_url":"https://github.com/moscicky/computer-networks-gg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moscicky/computer-networks-gg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moscicky%2Fcomputer-networks-gg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moscicky%2Fcomputer-networks-gg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moscicky%2Fcomputer-networks-gg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moscicky%2Fcomputer-networks-gg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moscicky","download_url":"https://codeload.github.com/moscicky/computer-networks-gg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moscicky%2Fcomputer-networks-gg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270287492,"owners_count":24558622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-06T01:53:08.666Z","updated_at":"2025-08-13T18:14:31.039Z","avatar_url":"https://github.com/moscicky.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# computer-networks-gg :thinking:\nRepository for Computer Networks project. \n\nRequirement are specified here: \nhttp://www.cs.put.poznan.pl/mboron/prez/zasady_projektow.pdf\n\nWe've decided to implement simple chat web app. \n\n## Technologies\n\nC/C++ with API BSD Sockets\n\nElectron with React\n\n## Start-up\n```CmakeLists``` is provided so that the code can be easily imported (i.e. to CLion). \n\nServer:\n1. ```cd gg-server```\n2. ```g++ -pthread main.cpp -o server -std=c++11```\n3. ```./server [port] [adres]```\n\n**Note: -Wc++11-extensions used** \n\nTest client:\n\n```nc [address] [port]```\n\n\n## Communication protocol\n1. User connects to the server, connections is given it's file descriptor. \n2. User sends his username.\n3. User receives list of available users ```500;user1;user2;...;```\n4. Other users receive new user's username ```200;new_user;```\n5. User sends message ```receiver;message;```\n6. User receives the message ```400;sender;message;```\n7. User quits, others receive ```300;user_that_left;```\n\n# Sprawozdanie\n\n**Demo oraz uruchomienie: [film](https://www.youtube.com/watch?v=LyKtO-P7hOo)** \n\n**Repozytorium klienta dostępne: [tutaj](https://github.com/szczupag/electron-react-client-for-chat-app)**\n\n## Opis protokołu\n\n* Uruchamiając serwer specyfikujemy jego port i adres. \n* Uruchamiając klienta specyfikujemy port i adres serwera.\n* Klient po podłączeniu do serwera otrzymuje deskryptor i wysyła nazwę: ```nazwa```\n* Podłączony klient otrzymuje listę podłączonych użytkowników: ```500;uzytkownik1;uzytkownik2;...;```\n* Pozostali podłączeni klienci otrzymują informację o nowym użytkowniku: ```200;nowy_uzytkownik;```\n* Klient wysyła wiadomość: ```adresat;wiadomosc;```\n* Klient otrzymuje wiadomość: ```400;nadawca;wiadomosc;```\n* Klient wychodzi, reszta klientów otrzymuje informację: ```300;odlaczony_uzytkownik;```\n* Wyłączono serwer ```600;```\n\n## Struktury projektu\n\n```client_thread_data ```\n\nDane wątku obsługującego klienta. Przekazywane do nowo powstałego wątku, zawierają id deskryptora gniazda do komunikacji z nowym użytkownikiem - ```int socket_fd```.\n\n```msg_data```\n\nDane dotyczące przesyłanej wiadomości. Zawierają id deskryptora gniazda odbiorcy - ``` int fd```, nazwę adresata - ```char sender[256]``` oraz wiadomość - ```char msg[256]```\n\n## Uruchamianie projektu\n\nSerwera zawiera plik ```CmakeLists``` umożliwiający łatwy import projektu do np. Cliona.\n\nSerwer:\n\n1. ```git clone https://github.com/moscicky/computer-networks-gg```\n2. ```cd gg-server```\n3. ```g++ -pthread main.cpp -o server -std=c++11 -Wall```\n4. ```./server adres|nazwa_domenowa port``` (np. ```./server 127.0.0.1 1234```)\n\n**Uwaga: użyto rozszerzeń -Wc++11-extensions** \n\nKlient:\n\n1. ```git clone https://github.com/szczupag/electron-react-client-for-chat-app```\n2. ```npm install```\n3. ```npm run dev```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoscicky%2Fcomputer-networks-gg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoscicky%2Fcomputer-networks-gg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoscicky%2Fcomputer-networks-gg/lists"}