https://github.com/sitetester/user-online-status-notifier-go
https://github.com/sitetester/user-online-status-notifier-go
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/sitetester/user-online-status-notifier-go
- Owner: sitetester
- Created: 2020-06-03T10:05:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-07T16:39:45.000Z (about 6 years ago)
- Last Synced: 2023-03-09T06:12:17.148Z (over 3 years ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is Golang based TCP service, and it satisfies the following points.
1. Start listening for tcp/udp connections.
2. Be able to accept connections.
3. Read json payload ({"user_id": 1, "friends": [2, 3, 4]})
3. After establishing successful connection - it "stores" it in memory.
4. When another connection established with the user_id from the list of any other user's "friends" section, they should be notified about it with a message {"online": true}
5. When the user goes offline, his "friends" (if it has any and any of them online) should receive a message {"online": false}