{"id":28995232,"url":"https://github.com/gusmaomatheus/chat-socket","last_synced_at":"2025-06-25T04:45:08.843Z","repository":{"id":298406528,"uuid":"999874858","full_name":"gusmaomatheus/chat-socket","owner":"gusmaomatheus","description":"Developed as a practical assessment for the RC1 subject.","archived":false,"fork":false,"pushed_at":"2025-06-25T00:36:47.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T01:38:39.248Z","etag":null,"topics":["python","socket","tcp-server","webchat"],"latest_commit_sha":null,"homepage":"","language":"Python","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/gusmaomatheus.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,"zenodo":null}},"created_at":"2025-06-10T23:39:06.000Z","updated_at":"2025-06-25T00:36:50.000Z","dependencies_parsed_at":"2025-06-11T00:36:07.999Z","dependency_job_id":"ad2fa363-75d6-4dc5-b691-aff0697286de","html_url":"https://github.com/gusmaomatheus/chat-socket","commit_stats":null,"previous_names":["gusmaomatheus/chat-socket"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gusmaomatheus/chat-socket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusmaomatheus%2Fchat-socket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusmaomatheus%2Fchat-socket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusmaomatheus%2Fchat-socket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusmaomatheus%2Fchat-socket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gusmaomatheus","download_url":"https://codeload.github.com/gusmaomatheus/chat-socket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gusmaomatheus%2Fchat-socket/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261807682,"owners_count":23212660,"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":["python","socket","tcp-server","webchat"],"created_at":"2025-06-25T04:45:08.059Z","updated_at":"2025-06-25T04:45:08.828Z","avatar_url":"https://github.com/gusmaomatheus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💬 Chat com Sockets TCP em Python\n\nEste projeto foi desenvolvido com fins acadêmicos como parte de uma avaliação da disciplina de Redes de Computadores.\n\nEste projeto implementa um **sistema de chat simples** utilizando **sockets TCP** com suporte a múltiplos clientes. Ele é uma ótima introdução à comunicação em rede com Python, utilizando `socket` e `threading`.\n\n---\n\n## 🚀 Funcionalidades\n\n- ✅ Múltiplos clientes conectados simultaneamente\n- ✅ Troca de mensagens em tempo real\n- ✅ Comunicação usando TCP/IP\n- ✅ Arquitetura cliente-servidor\n- ✅ Interface em terminal (linha de comando)\n\n---\n\n## 🧱 Estrutura\n\nO projeto é composto por dois arquivos principais:\n\n- `server.py`: roda o servidor que gerencia conexões e transmite mensagens.\n- `client.py`: roda um cliente que envia e recebe mensagens no chat.\n\n---\n\n## 🔧 Requisitos\n\n- Python 3.x instalado\n- Terminal ou prompt de comando\n\n---\n\n## ▶️ Como executar\n\n### 1. Clonar o repositório\n\n```bash\n\u003e $ git clone https://github.com/gusmaomatheus/chat-socket.git\n\u003e $ cd chat-socket-python\n```\n\n### 2. Iniciar o servidor (em um terminal):\n\n```bash\n\u003e $ python server.py\n```\n\n### 3. Iniciar um ou mais clientes (em outro(s) terminal(is)):\n\n```bash\n\u003e $ python client.py\n```\n\n```bash\nTerminal 1 (servidor):\n[Servidor iniciado] Aguardando conexões em 127.0.0.1:12345...\n[Nova conexão] ('127.0.0.1', 54321) conectado.\n\nTerminal 2 (cliente):\nDigite seu nome: Ana\nPedro: Oi Ana!\nAna: Oi Pedro! Tudo bem?\n\nTerminal 3 (cliente):\nDigite seu nome: Pedro\nAna: Oi Pedro! Tudo bem?\n\n```\n\n# 🧠 Como funciona\n\n- O servidor escuta novas conexões e cria uma thread para cada cliente.\n\n- Cada cliente roda duas threads:\n\n    - Uma para enviar mensagens digitadas.\n\n    - Outra para receber mensagens do servidor.\n\n- O servidor recebe as mensagens dos clientes e as retransmite para todos os outros conectados.\n\n# 🎬 Demonstração\n\n[Vídeo do YouTube](https://youtu.be/so3miX4kUMk)\n\n# 📜 Licença\n\nEste projeto está licenciado sob a licença **MIT**. Sinta-se livre para usar e modificar!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusmaomatheus%2Fchat-socket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgusmaomatheus%2Fchat-socket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgusmaomatheus%2Fchat-socket/lists"}