Commit graph

21 commits

Author SHA1 Message Date
c76ea3628b add timeout consts in new file 2024-11-21 18:50:00 +01:00
51b08b66e0 refactor: drop SendMessage() and merge into SendPermanentBroadCastMessage() 2024-11-21 18:50:00 +01:00
b5e1b5cc88 add more Mutex Locks for Clients map 2024-11-21 18:50:00 +01:00
7e5b0659b4 move stale client check to RemoveStaleClients() 2024-11-21 18:50:00 +01:00
ccd0c38b58 add client.IsStale() 2024-11-21 18:50:00 +01:00
a25ee424aa skip client after closing unresponsive client 2024-11-21 18:50:00 +01:00
32e00480f8 optimize ping/pong code 2024-11-21 18:50:00 +01:00
d975034680 remove duplicate logging 2024-11-21 18:50:00 +01:00
c63ef3c12a add more log output 2024-11-21 18:50:00 +01:00
2ddc1ef9e4 move check for unresponsive clients to additional loops 2024-11-21 18:50:00 +01:00
9fa740b2c6 try to check for last ping connect 2024-11-21 18:50:00 +01:00
03d94d5999 another try to remove vanished clients 2024-11-21 18:50:00 +01:00
75b3ae87d6 feat: remove client from active connections after write deadline
- add a constant for timeout duration in seconds
- set write deadline for client connections
- remove client from active connections on error
- log additional information when broadcasting fails

🤖
2024-11-21 18:49:58 +01:00
600d2ed2ff feat: implement centralized logging helper
- remove direct log usage
- create a new logging helper
- update all log calls to use the new Logger instance
- set timestamp to ISO8601

🤖
2024-11-04 20:33:25 +01:00
d0b1260f62 doc: add and improve comments 2024-10-30 07:39:30 +01:00
b8823acc97 refacor: replace shared.Message with shared.State
🤖
2024-10-29 18:46:00 +01:00
e2ab19066d format: update import statements order for consistency 2024-10-29 11:05:45 +01:00
899417b605 feat: replace standard log with charmbracelet/log
- update logging to use charmbracelet/log package
- improve log messages for server start and errors
- enhance client connection and disconnection logs

🤖
2024-10-26 00:15:02 +02:00
62fbb1d356 feat: add a ticker to manage broadcast timing 2024-10-25 23:18:46 +02:00
28342058aa doc: update comments 2024-10-21 13:07:19 +02:00
6ffd9f1e38 refactor: move broadcast package to websocket
- update import paths to reflect the new package name
- change function call to use the new websocket package
- adjust client iteration to use the renamed Clients variable

🤖
2024-10-21 13:07:19 +02:00
Renamed from internal/broadcast/broadcast.go (Browse further)