{"id":19379160,"url":"https://github.com/matbagnoletti/unicasttcpsocketchat","last_synced_at":"2025-10-05T13:17:32.133Z","repository":{"id":224804358,"uuid":"764125128","full_name":"matbagnoletti/UnicastTCPSocketChat","owner":"matbagnoletti","description":"Applicazione Java che utilizza le socket per implementare una comunicazione TCP unicast tra Client e Server.","archived":false,"fork":false,"pushed_at":"2024-04-04T05:34:11.000Z","size":30,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T09:50:16.380Z","etag":null,"topics":["client-server","java","socket","tcp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matbagnoletti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-02-27T14:23:21.000Z","updated_at":"2024-04-11T16:34:48.000Z","dependencies_parsed_at":"2024-03-26T16:46:39.248Z","dependency_job_id":"9290bb06-3426-4e56-941e-8f36dbff26fc","html_url":"https://github.com/matbagnoletti/UnicastTCPSocketChat","commit_stats":null,"previous_names":["matbagnoletti/unicasttcpsocketchat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matbagnoletti/UnicastTCPSocketChat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbagnoletti%2FUnicastTCPSocketChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbagnoletti%2FUnicastTCPSocketChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbagnoletti%2FUnicastTCPSocketChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbagnoletti%2FUnicastTCPSocketChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matbagnoletti","download_url":"https://codeload.github.com/matbagnoletti/UnicastTCPSocketChat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matbagnoletti%2FUnicastTCPSocketChat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278459460,"owners_count":25990351,"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-10-05T02:00:06.059Z","response_time":54,"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":["client-server","java","socket","tcp"],"created_at":"2024-11-10T09:09:16.449Z","updated_at":"2025-10-05T13:17:32.101Z","avatar_url":"https://github.com/matbagnoletti.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eUnicastTCPSocketChat\u003c/h1\u003e\n\n\u003cp align=\"center\" style=\"font-family: monospace\"\u003eMade by \u003ca href=\"https://github.com/matbagnoletti\"\u003e@matbagnoletti\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\" style=\"font-family: monospace\"\u003eDocenti: prof.ssa \u003ca href=\"https://github.com/mciuchetti\"\u003e@mciuchetti\u003c/a\u003e e prof.ssa Fioroni\u003c/p\u003e\n\u003cp align=\"center\" style=\"font-family: monospace\"\u003eCorso TPSIT a.s. 2023/2024, \u003ca href=\"https://www.avoltapg.edu.it/\"\u003eITTS A. Volta (PG)\u003c/a\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/matbagnoletti/UnicastTCPSocketChat?style=for-the-badge\" alt=\"Ultimo commit\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/top/matbagnoletti/UnicastTCPSocketChat?style=for-the-badge\" alt=\"Linguaggio\"\u003e\n\u003c/p\u003e\n\n## Descrizione\nApplicazione Java che utilizza le socket per implementare una comunicazione TCP unicast tra più Client e un Server.\n\n## Requisiti\n- [JDK](https://www.oracle.com/it/java/technologies/downloads/) (v8 o superiore)\n- [Gradle](https://gradle.org/install/) (v8.6)\n\nÈ possibile visualizzare le versioni già presenti sul proprio dispositivo mediante i seguenti comandi:\n```\njava --version\ngradle --version\n```\n\n## Installazione e utilizzo\n1. Scaricare il file compresso del progetto\n2. Estrarre il progetto\n3. Eseguire il Server e il Client separatamente:\n   - Tramite IDE\n   - Tramite terminale:\n     1. Naviga nella root del progetto\n     2. Esegui la build del progetto: `gradle build`\n     3. Identifica il file `jar` nella directory `/build/libs/`\n     4. Esegui il Server: `java -cp build/libs/\u003cnome-del-file-jar\u003e.jar chat.server.MainServer`\n     5. Esegui il Client in un'altra finestra: `java -cp build/libs/\u003cnome-del-file-jar\u003e.jar chat.client.MainClient`\n     \n## Struttura e funzionamento\nIl progetto si compone da quattro classi:\n\n- Nel package `chat.client`:\n  - L'entità [`Client`](src/main/java/chat/client/Client.java)\n  - [`MainClient`](src/main/java/chat/client/MainClient.java), la classe di avvio del Client\n\n- Nel package `chat.server`:\n  - L'entità [`Server`](src/main/java/chat/server/Server.java)\n  - [`MainServer`](src/main/java/chat/server/MainServer.java), la classe di avvio del Server\n  - [`Chat`](src/main/java/chat/server/Chat.java), la classe che si occupa di gestire i diversi Client connessi al Server\n\nLe due entità, dopo una configurazione iniziale, permetteranno all'utente di poter scrivere messaggi da inviare all'altra entità e ricevere, contemporaneamente (tramite l'utilizzo dei thread), messaggi che verranno stampati a video.\n\nIl Server permette a più Client di comunicare con lui, ma i Client potranno comunicare solo con il Server, essendo una comunicazione unicast.\n\nLato-Server per poter comunicare con uno dei possibili Client connessi sarà necessario scrivere:\n```text\n\u003cpayload\u003e -\u003e \u003cusernameDestinatario\u003e\n```\n\nLa chat termina quando uno dei due digita `exit` nella console: in questo caso verranno invocati i rispettivi metodi di chiusura degli stream (`chiudi()`).\n\nEntrambe le classi sono strutturate in modo che, nel caso in cui si verificasse improvvisamente un errore o un'eccezione (come ad esempio la disconnessione di una delle due entità), il programma, dopo averlo segnalato, invocherà i rispettivi metodi di chiusura degli stream (`chiudi()`).\n\n## Licenza d'uso\nQuesto progetto (e tutte le sue versioni) sono rilasciate sotto la [MB General Copyleft License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatbagnoletti%2Funicasttcpsocketchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatbagnoletti%2Funicasttcpsocketchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatbagnoletti%2Funicasttcpsocketchat/lists"}