{"id":22328581,"url":"https://github.com/pkg-dot-zip/singleroomudpchatservice","last_synced_at":"2025-03-26T06:25:59.630Z","repository":{"id":265770328,"uuid":"861719012","full_name":"pkg-dot-zip/SingleRoomUdpChatService","owner":"pkg-dot-zip","description":"A simple UDP-based chat system built in Kotlin for a university network programming assignment.","archived":false,"fork":false,"pushed_at":"2024-10-23T08:11:30.000Z","size":770,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T03:47:41.001Z","etag":null,"topics":["event-driven","kotlin","kotlin-jvm","udp","udp-client","udp-server"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/pkg-dot-zip.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":"2024-09-23T12:01:39.000Z","updated_at":"2024-10-02T09:53:17.000Z","dependencies_parsed_at":"2024-12-07T15:35:48.601Z","dependency_job_id":null,"html_url":"https://github.com/pkg-dot-zip/SingleRoomUdpChatService","commit_stats":null,"previous_names":["pkg-dot-zip/singleroomudpchatservice"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg-dot-zip%2FSingleRoomUdpChatService","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg-dot-zip%2FSingleRoomUdpChatService/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg-dot-zip%2FSingleRoomUdpChatService/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pkg-dot-zip%2FSingleRoomUdpChatService/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pkg-dot-zip","download_url":"https://codeload.github.com/pkg-dot-zip/SingleRoomUdpChatService/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245600578,"owners_count":20642321,"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","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":["event-driven","kotlin","kotlin-jvm","udp","udp-client","udp-server"],"created_at":"2024-12-04T03:13:01.634Z","updated_at":"2025-03-26T06:25:59.608Z","avatar_url":"https://github.com/pkg-dot-zip.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pkg-dot-zip/SingleRoomUdpChatService/\" rel=\"noopener\"\u003e\n    \u003cimg width=400px height=400px src=\"docs/logo.png\" alt=\"Project logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eSingleRoomUdpChatService\u003c/h3\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  [![Stars](https://img.shields.io/github/stars/pkg-dot-zip/SingleRoomUdpChatService.svg)](https://github.com/pkg-dot-zip/SingleRoomUdpChatService/stargazers)\n  [![GitHub Issues](https://img.shields.io/github/issues/pkg-dot-zip/SingleRoomUdpChatService.svg)](https://github.com/pkg-dot-zip/SingleRoomUdpChatService/issues)\n  [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/pkg-dot-zip/SingleRoomUdpChatService.svg)](https://github.com/pkg-dot-zip/SingleRoomUdpChatService/pulls)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eA simple UDP-based chat system built in \u003ca href=\"https://kotlinlang.org/\"\u003eKotlin\u003c/a\u003e for a university network programming assignment.\n\u003c/p\u003e\n\n## 📝 Table of Contents\n- [About](#about)\n- [Usage](#usage)\n- [Built Using](#built_using)\n- [Authors](#authors)\n\n## 🧐 About \u003ca name=\"about\"\u003e\u003c/a\u003e\nThis repository contains a simple UDP-based chat system built in Kotlin as part of a university assignment. The project involves creating a basic client-server architecture using datagram sockets to facilitate communication between clients. The server handles multiple clients, and users can send messages, change statuses, or disconnect from the system.\n\n### What does it do? 🤔\nThe project establishes a communication system where a server listens for incoming messages from multiple clients over UDP. Each client can send messages to the server, and the server broadcasts these messages to all connected clients. It also supports user commands like setting their status to \"available,\" \"busy,\" or \"offline.\" The system is built from scratch, with no pre-built libraries for handling UDP or messaging.\n\n### Why?! 😱\nThis project serves as a practice assignment to strengthen understanding of socket programming and network protocols. The challenge was to implement a basic chat system using the User Datagram Protocol (UDP), where connection-less communication is leveraged. The assignment required handling packet transmission, managing client statuses, and broadcasting messages to all clients in real time.\n\nThis project **improves** skills in network programming, concurrency, and event-driven design, laying a strong foundation for developing more complex networking applications.\n\n### Features 🌟\n- **Multiclient Support**: The server handles multiple clients simultaneously, allowing them to communicate in a shared chat room.\n- **User Status**: Clients can set their status to available, busy, or offline using commands like `/available`, `/busy`, and `/offline`.\n- **UDP Communication**: The system uses UDP sockets to transmit messages between clients and the server.\n- **Acknowledgement Handling**: Ensures that the server acknowledges messages from the client, providing basic reliability over UDP.\n- **Broadcast Messaging**: The server broadcasts messages to all connected clients except the sender.\n- **Inactivity Timeout**: Clients are automatically set to offline if inactive for more than 5 minutes.\n- **Event System**: Coded using events architecture!\n  \n## 🎈 Usage \u003ca name=\"usage\"\u003e\u003c/a\u003e\n1. Clone the repository.\n1. Open the project in [IntelliJ](https://www.jetbrains.com/idea/).\n1. Run the server:\n    - Execute the `Server` class located in the `com.pkg_dot_zip.server` package to start the server.\n1. Run multiple clients:\n    - Execute the `Client` class located in the `com.pkg_dot_zip.client` package to start a client. Repeat this to create another one.\n1. Use commands like `/available`, `/busy`, and `/offline` to change status, or type a message.\n\n## ⛏️ Built Using \u003ca name = \"built_using\"\u003e\u003c/a\u003e\n- [IntelliJ](https://www.jetbrains.com/idea/) - IDE used\n- [Kotlin](https://kotlinlang.org/) - Language used to program in\n- [kotlin-logging](https://github.com/oshai/kotlin-logging) - Lightweight Multiplatform logging framework for Kotlin. A convenient and performant logging facade\n- [UDP Sockets](https://docs.oracle.com/javase/8/docs/api/java/net/DatagramSocket.html) - Used for socket-based communication between clients and server\n\n## ✍️ Authors \u003ca name = \"authors\"\u003e\u003c/a\u003e\n- [@OnsPetruske](https://github.com/pkg-dot-zip) - Idea \u0026 Initial work.\n\nSee also the list of [contributors](https://github.com/pkg-dot-zip/SingleRoomUdpChatService/contributors) who participated in this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg-dot-zip%2Fsingleroomudpchatservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkg-dot-zip%2Fsingleroomudpchatservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkg-dot-zip%2Fsingleroomudpchatservice/lists"}