31 Commits

Author SHA1 Message Date
Adam Honse
c71cc4f18a Change SPDX license identifier from GPL 2.0 only to GPL 2.0 or later, as the original LICENSE file includes an or later clause at the end so the file headers were incorrect 2025-09-28 00:47:08 -05:00
Adam Honse
df73d0263a Add send_in_progress locks around send groups in NetworkServer.cpp 2025-07-04 23:37:23 -05:00
Adam Honse
0cfe5ae0bb Add SDK command to rescan devices 2025-07-04 04:24:37 -05:00
Adam Honse
471f9d3e2e Add server option to disable the size check called legacy workaround, which can be enabled to allow some old SDK apps that didn't properly implement the size to still be used 2025-01-08 20:44:20 -06:00
Dmitry Kychanov
b171906162 Fixed server 2024-10-05 02:47:02 +04:00
Adam Honse
a7c400bc65 Update yet more file header comments to standardized new format 2024-05-03 21:56:32 -05:00
Jack
4baf19f13a SDK plugin control 2023-01-25 17:50:28 +00:00
B Horn
640eb7905c SDK Listening Options 2022-07-17 20:30:15 +00:00
k1-801
65623d3978 Autoclose updated
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-05-24 22:45:24 -05:00
k1-801
abfb6ea22d Tiny fixups (server conn info leak closed, log va leak closed, config dir optimized)
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-05-24 22:41:12 -05:00
k1-801
02ba8a799e Server freed from ResourceManager
Commit amended to revert OpenRGBInterfaces.h header (may reconsider in the future) by Adam Honse
<calcprogrammer1@gmail.com>
2021-05-13 22:10:41 -05:00
morg
79dacbaeb0 Fix crash on server stop
Commit amended to initialize listening variable by Adam Honse <calcprogrammer1@gmail.com>
2021-02-09 16:34:25 -06:00
morg
e2bc1003e6 Add profile management to SDK
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-02-05 19:13:50 -06:00
Adam Honse
72da8f362c SDK protocol versioning implemented. Protocol updated to version 1 which adds vendor string to controller request. 2020-12-01 21:02:32 -06:00
k1-801
dde857dfb4 Tiny threads fixes & a little bit of safety 2020-11-15 13:28:29 -06:00
Adam Honse
60fd721586 Server sends a request to the client when the device list is updated 2020-09-27 22:12:34 +00:00
B Horn
47baeb6b6b Improving NetworkServer's memory management (#373)
This patch resolves several bugs:

* NetworkServer would allocate various instances of `NetworkClientInfo`.
  This is patched by deallocating the NetworkClientInfo when it's
  listening thread ends in the `listen_done` section.

* Memory would be allocated for threads that wouldn't be freed. This
  is resolved by detaching from the threads, so they no longer need to
  be joined to be freed, and then freeing the memory as they finish.

* Thread-Safety issues involving `ServerClients` would result in stray
  `NetworkClientInfo`'s not being removed from the list in certain
  situations. This is resolved by used a mutex to lock access to this
  from different threads.
2020-07-09 21:56:42 -05:00
Térence Clastres
b79ff124e6 Replace Sleep() by std::thread::sleep_for() 2020-06-24 09:28:11 -05:00
Adam Honse
352b9928ca Add file headers to network files and some minor code cleanup 2020-05-09 15:48:16 -05:00
Adam Honse
a5e9a3de05 Add mutex on updating callbacks 2020-05-09 15:48:15 -05:00
Adam Honse
edf1b251c0 Send and receive client string 2020-05-09 15:48:15 -05:00
Adam Honse
9ff4314840 Add callback to NetworkServer to handle UI updates when client information changes 2020-05-09 15:48:15 -05:00
Adam Honse
3ad0986ae7 Add IP field to client information and display client IP in the server tab's connected client list 2020-05-09 15:48:15 -05:00
Adam Honse
6bfc9dd9db Create a structure to hold client information in the network server and fix i2c hanging on destructor when bus is not available. 2020-05-09 15:48:15 -05:00
Adam Honse
119741b736 Fix build on Windows 2020-05-09 15:48:15 -05:00
Adam Honse
2fe958783c Use select on accept call as well so that server closes on Linux 2020-05-09 15:48:15 -05:00
Adam Honse
9e44e4ba4f Add server information to user interface and provide buttons to start and stop server, change port 2020-05-09 15:48:15 -05:00
Adam Honse
81acc47cd6 Use std::thread for NetworkServer threads 2020-05-09 15:48:14 -05:00
Adam Honse
68fa3c2def Create functions for sending replies 2020-05-09 15:48:13 -05:00
Adam Honse
46339c5f86 More work on network support, need to implement spawning of one read thread for each client socket 2020-05-09 15:48:12 -05:00
Adam Honse
594f66ab23 Initial network files 2020-05-09 15:48:12 -05:00