{"id":26718251,"url":"https://github.com/sevenproxy/yggdrasil","last_synced_at":"2025-10-09T04:16:20.907Z","repository":{"id":283400107,"uuid":"948161324","full_name":"SevenProxy/yggdrasil","owner":"SevenProxy","description":"IRC","archived":false,"fork":false,"pushed_at":"2025-03-21T03:58:41.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-14T23:43:39.325Z","etag":null,"topics":["irc","irc-server","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/SevenProxy.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-03-13T21:15:18.000Z","updated_at":"2025-03-23T05:11:03.000Z","dependencies_parsed_at":"2025-03-21T12:51:25.467Z","dependency_job_id":null,"html_url":"https://github.com/SevenProxy/yggdrasil","commit_stats":null,"previous_names":["sevenproxy/yggdrasil"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SevenProxy/yggdrasil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenProxy%2Fyggdrasil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenProxy%2Fyggdrasil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenProxy%2Fyggdrasil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenProxy%2Fyggdrasil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SevenProxy","download_url":"https://codeload.github.com/SevenProxy/yggdrasil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SevenProxy%2Fyggdrasil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000761,"owners_count":26082921,"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-09T02:00:07.460Z","response_time":59,"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":["irc","irc-server","rust"],"created_at":"2025-03-27T16:37:05.821Z","updated_at":"2025-10-09T04:16:20.902Z","avatar_url":"https://github.com/SevenProxy.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Contexto\n\n**O `servidor IRC` é software que utiliza o protocolo `TCP`, para receber e enviar dados para a conexão estabelecida.**\nO Projeto utiliza o modulo/lib [tokio](https://tokio.rs/) para iniciar essa conexão.\nNo arquivo `main.rs`, temos a conexão sendo iniciada:\n`/main.rs`\n```rs\npub use tokio::net::{TcpListener, TcpStream}; // Essa chamada do modulos já ocorre dentro de `lib.rs`, isso é apenas uma demostração.\nuse irc_server::{Handler, Mutex, ServerError, TcpListener};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), ServerError\u003e {\n  let listener: TcpStream = TcpListener::bind(\"127.0.0.1:6667\").await?;\n\n  // Precisamos deixa-la em loop, para receber multiplas conexões.\n  loop {\n    // Aqui usamos o metodo accept para receber uma conexão. Veja que socket passa a ser a conexão vinda do client.\n    let (socket: TcpStream, _) = listener.accept().await?;\n\n    // Em seguida, para evitar erros de multiplas conexões, ou sobrescrever conexões existentes, usamos o Mutext da lib/modulo Tokio.\n    //\n    // Com isso, garantimos que a conexão estabelecida não seja alterada ou sobescrita, deixando-as com um fluxo de controle melhor, pois assim teremos um controle de conexão único para cada client conectado.\n    let socket = Arc::new(Mutex::new(socket));\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenproxy%2Fyggdrasil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsevenproxy%2Fyggdrasil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsevenproxy%2Fyggdrasil/lists"}