Commit graph

37 commits

Author SHA1 Message Date
Joachim Bauch
179498f28b
Move signaling api types to api package. 2026-01-12 13:16:25 +01:00
Joachim Bauch
25e040ffb9
Move buffer/httpclient pools to pool package. 2026-01-12 13:16:22 +01:00
Joachim Bauch
22f45ac482
Move closer helper to internal package. 2026-01-08 10:24:02 +01:00
Joachim Bauch
62587796ce
Move logging code to separate package. 2025-12-09 15:26:47 +01:00
Joachim Bauch
9ee64b8c66
Add metrics about client bytes/messages sent/received. 2025-12-01 16:44:15 +01:00
Joachim Bauch
6ca41dee61
Don't use global logger. 2025-11-20 09:42:40 +01:00
Joachim Bauch
71fda2f258
Add metric for RTT of WebSocket ping messages. 2025-11-06 20:41:52 +01:00
Joachim Bauch
cfd8cf6718
Use gvisor checklocks for static lock analysis.
Also fix locking issues found along the way.

See https://github.com/google/gvisor/tree/master/tools/checklocks for details.
2025-10-01 13:49:32 +02:00
Joachim Bauch
51326069e2
Add dedicated types for different session ids. 2025-09-09 11:38:47 +02:00
Joachim Bauch
613806be14
modernize: Replace "interface{}" with "any". 2025-07-30 09:44:18 +02:00
Joachim Bauch
411cf34437
Use buffer pool for reading data. 2025-04-16 10:22:57 +02:00
Joachim Bauch
24dd3f08ef
Use tagged switch instead of comparison where sensible. 2025-03-26 14:08:35 +01:00
Joachim Bauch
e1fc062464
proxy: Add timeouts to requests to Janus and cancel if session is closed. 2024-10-28 09:24:23 +01:00
Joachim Bauch
4f95416b94
Send websocket close message before closing connection and don't log error if explicitly closed. 2024-08-06 09:13:18 +02:00
Joachim Bauch
0b259a8171
Merge pull request #732 from strukturag/close-context
Add Context to clients / sessions.
2024-05-16 09:36:34 +02:00
Joachim Bauch
3e92664edc
Don't log read error after we closed the connection. 2024-05-16 09:23:32 +02:00
Joachim Bauch
0ee976d377
Add Context to clients / sessions.
The Context will be closed when the client disconnects / the session is removed,
so any pending requests can be cancelled.
2024-05-16 09:07:59 +02:00
Joachim Bauch
f8899ef189
Add mutex for "handler" in client.
Fix flaky race as follow-up to #715
2024-04-23 12:42:31 +02:00
Joachim Bauch
0c2cefa63a
Don't return "false" if message sending closed the connection. 2024-04-23 11:09:04 +02:00
Joachim Bauch
2468443572
Add "HandlerClient" interface to support custom implementations. 2024-04-23 11:03:30 +02:00
Joachim Bauch
c134883138
Switch to atomic types from Go 1.19 2023-10-30 09:32:46 +01:00
Joachim Bauch
d49d3704fa
Use interface for client callbacks. 2023-02-22 08:34:17 +01:00
Joachim Bauch
e9f80c6b4d
Start message processing earlier. 2023-02-22 08:34:17 +01:00
Joachim Bauch
8353cbbb0f
Migrate to closer helper class. 2023-02-22 08:34:15 +01:00
Joachim Bauch
758899b745
Simplify close code of client to make clear when it gets closed internally. 2023-02-22 08:34:14 +01:00
Joachim Bauch
b7f221705a
Close message channel before closing client.
Otherwise the call to "Close" might wait forever for the message processing
goroutine to finish.
2023-01-18 14:26:40 +01:00
Joachim Bauch
8de8b39a5c
Stop using WaitGroup to detect finished message processing.
This causes flaky races if "Wait" and "Add" are being used from different
goroutines.
2023-01-17 12:09:06 +01:00
Joachim Bauch
614c5f6e21
Fix issues reported by revive. 2022-02-11 12:09:42 +01:00
Joachim Bauch
782503a141
Don't log RTT of proxy clients. 2021-11-03 14:56:51 +01:00
Joachim Bauch
ce1b3fc6e2
Add more metrics on rooms / sessions / backends. 2021-08-10 08:50:41 +02:00
Joachim Bauch
2628735431
Send close message when explicitly closing client. 2021-06-07 17:14:31 +02:00
Joachim Bauch
fe95626f3b
Support closing clients from message processor. 2021-06-07 15:15:50 +02:00
Joachim Bauch
618e7b085e
Fix potential race condition when closing message channel. 2021-06-07 15:14:51 +02:00
Joachim Bauch
b8b46264c1
Create messagechan for proxy clients. 2021-06-04 15:40:42 +02:00
Joachim Bauch
2b02a2f929
Make client message processing asynchronous.
This helps in detecting clients that disconnect while a backend request for
them is still active (e.g. joining a room).
2021-06-04 15:40:39 +02:00
Joachim Bauch
c8e4bfe007
Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch
8ba2e0ad64
Switch dependency tracking to Go modules.
With that bump minimum required version to Go 1.13.
2021-04-09 16:15:00 +02:00
Renamed from src/signaling/client.go (Browse further)