{"id":36907046,"url":"https://github.com/yazver/msgreceiver","last_synced_at":"2026-01-12T15:53:35.691Z","repository":{"id":102678348,"uuid":"126564312","full_name":"yazver/msgreceiver","owner":"yazver","description":"The simple application and package written in Go that demonstrates the ability to send messages from clients to the server via a TCP connection","archived":false,"fork":false,"pushed_at":"2018-03-24T12:47:39.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T12:42:37.655Z","etag":null,"topics":["example","golang","golang-application","golang-package","tcp","tcp-client","tcp-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yazver.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":"2018-03-24T04:03:11.000Z","updated_at":"2018-03-24T12:47:40.000Z","dependencies_parsed_at":"2023-08-26T18:21:02.109Z","dependency_job_id":null,"html_url":"https://github.com/yazver/msgreceiver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yazver/msgreceiver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazver%2Fmsgreceiver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazver%2Fmsgreceiver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazver%2Fmsgreceiver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazver%2Fmsgreceiver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yazver","download_url":"https://codeload.github.com/yazver/msgreceiver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yazver%2Fmsgreceiver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T15:50:39.657Z","status":"ssl_error","status_checked_at":"2026-01-12T15:49:49.297Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["example","golang","golang-application","golang-package","tcp","tcp-client","tcp-server"],"created_at":"2026-01-12T15:53:33.845Z","updated_at":"2026-01-12T15:53:35.676Z","avatar_url":"https://github.com/yazver.png","language":"Go","readme":"# Message receiver\nThe simple application and package written in Go that demonstrates the ability to send messages from clients to the server via a TCP connection.\n\n[Documentation.](https://godoc.org/github.com/yazver/msgreceiver/shared/lan)\n\nSending messages\n\n```go\nfunc sendMessages(id int) {\n\tclient, err := lan.NewClient(\"127.0.0.1:9999\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer client.Close()\n\tfor i := 0; i \u003c 6; i++ {\n\t\tm := \u0026lan.Message{fmt.Sprintf(\"Client: %d; Message: %d\", id, i)}\n\t\tif err := client.Send(m); err != nil {\n\t\t\tlog.Printf(\"Error: %s\\n\", err)\n\t\t}\n\t\tlog.Println(m.Name)\n\t}\n}\n\nfunc main() {\n\tgo sendMessages(3)\n\tsendMessages(1)\n\tsendMessages(2)\n}\n```\n\nReceiving messages\n\n```go\nfunc main() {\n\tserver, err := lan.NewServer(\"127.0.0.1:9999\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Println(\"Server started.\")\n\tc := server.Receive()\n\tfor m := range c {\n\t\tif m != nil {\n\t\t\tlog.Println(m.Name)\n\t\t} else {\n\t\t\tlog.Println(\"Something wrong.\")\n\t\t}\n\t}\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazver%2Fmsgreceiver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyazver%2Fmsgreceiver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyazver%2Fmsgreceiver/lists"}