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
7 months ago
Adam Honse
2affb6d1e7
Add missing send_in_progress locks around send groups in NetworkClient.cpp
10 months ago
Adam Honse
4cc6a28e73
Rework NetworkClient server initialization to allow interruption and restarting of server list request process when server sends a device list updated notification
10 months ago
Adam Honse
5aaadf4e5a
Require protocol version 5 to send rescan devices packet and to show rescan button in clients list
10 months ago
Adam Honse
80dee91ab9
Add client functionality to send rescan request and add rescan button for each client in client list
10 months ago
Adam Honse
bb79fbfc07
Add controller flags field with flags for controller location and update behavior
1 year ago
Adam Honse
012cb5e62d
Fix segment creation and modification over the network protocol
1 year ago
Adam Honse
9d3956c168
Fix warnings in NetworkClient.cpp
1 year ago
Adam Honse
8a36717842
Remove LogManager dependency from NetworkClient.cpp
...
NetworkClient/Server code should have minimal internal dependencies as it is intended to be includable in external applications, pulling in only the absolutely necessary files so that it may be used in third party SDK applications. LogManager is not a necessary dependency.
2 years ago
Dmitry Kychanov
d612b8b8de
Network shutdown optimization
2 years ago
Adam Honse
e2126b9d29
Fix resizing zones over the network
2 years ago
Adam Honse
99c1aa0c26
Add a mutex around groups of send() calls in NetworkClient.cpp to fix corrupt packets due to race conditions. If two network RGBControllers try to send a packet with data at the same time, a race condition could cause data from another thread to send in between the header and data for the active thread, corrupting the data stream.
2 years ago
Adam Honse
44268596b3
Add a size check to the client on controller data receiving
2 years ago
Adam Honse
a7c400bc65
Update yet more file header comments to standardized new format
2 years ago
Adam Honse
89983dcdd1
Process received magic using a loop in client and server
2 years ago
Adam Honse
cf4fd16b09
Define SDK magic string value as a shared constant in NetworkProtocol.cpp, use InitNetPacketHeader function to set up packets
2 years ago
Adam Honse
1c62c26cac
Clean up comment formatting in NetworkClient.cpp
2 years ago
Adam Honse
219483267c
Fix MacOS warning in NetworkClient.cpp
4 years ago
B Horn
640eb7905c
SDK Listening Options
4 years ago
Chris
f3eac499d4
Allow for server side controller resizing
...
* Save sizes profile on the server
* Update RGBController_Network size on the client
4 years ago
B Horn
937451d6e8
SDK Client Disconnection Fixes
4 years ago
Adam Honse
b6cc0bda21
Fix profile packets in SDK client not including the null terminator for the strings
5 years ago
Adam Honse
5130f07e21
Add saving support to network protocol
5 years ago
Adam Honse
d88f9979a9
Rework network client callback pipeline - route callbacks from clients through ResourceManager so that device list callbacks get called. Fixes remote devices not showing up in plugins.
5 years ago
k1-801
402423e338
Fix a memory leak in NetworkClient
5 years ago
morg
e2bc1003e6
Add profile management to SDK
...
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
5 years ago
Adam Honse
72da8f362c
SDK protocol versioning implemented. Protocol updated to version 1 which adds vendor string to controller request.
6 years ago
k1-801
dde857dfb4
Tiny threads fixes & a little bit of safety
6 years ago
Adam Honse
716b2aaac3
Protect controller list updates with mutex
6 years ago
Adam Honse
8347644b07
Client clears list and reinitializes controller when the device list updates
6 years ago
Adam Honse
f568253c51
Clean up more warnings
6 years ago
k1-801
8b8451017e
Non-important warnings removed
...
Commit amended by Adam Honse <calcprogrammer1@gmail.com> due to merging from a different branch.
6 years ago
Térence Clastres
53379c5482
Fixes for memory issues detected by valgrind
6 years ago
Adam Honse
0ccf2d0c33
Remove some debugging printouts in Network Client and Server code
6 years ago
Adam Honse
5ce6ec9ea7
Request updated controller mode from server after sending a Set Custom Mode command
6 years ago
Neel Chotai
263561868c
fix musl compilation
6 years ago
Adam Honse
96af869d79
Check for local server before detecting devices from hardware and tweak timeouts to make network connections faster
6 years ago
Térence Clastres
1db412e970
Fix high CPU usage when running the SDK server
...
It was coming from `recv_select()` and `accept_select()`
The timeval struct members for select() is reset after each call to select() for
whatever reason so like FD_ZERO and FD_SET it needs to be placed inside
the loop.
Source: https://stackoverflow.com/questions/3324078/why-select-always-return-0-after-the-first-timeout
6 years ago
Térence Clastres
b94f701db8
Fix high CPU usage when running the SDK server
...
It was coming from `recv_select()` `nd accept_select()`
The timeout for select() is only when waiting for the file descriptor to
be ready for reading/writing so when the FD is ready AND there is
nothing to read, it will not return and instead keep executing the while loop with no timeout.
Fix this by adding a 100ms timeout when there is nothing to read.
6 years ago
Térence Clastres
b79ff124e6
Replace Sleep() by std: 🧵 :sleep_for()
6 years ago
Adam Honse
0464fbcbe2
Make default SDK port a defined constant
6 years ago
Térence Clastres
6d585d3eeb
Network: Print used port on startup and change default to 6742
...
Also print an error if server can't be started
1337 is already used by razer's rest server
Port idea by @bahorn (6742 = ORGB on a phone numpad)
6 years ago
Adam Honse
f2c1022c7f
Don't consider client online until it has been initialized
6 years ago
Adam Honse
cbb13b0d22
Add MacOS support to NetworkClient.cpp
6 years ago
Adam Honse
bd6ec4c41e
Get client stop function working
6 years ago
Adam Honse
e6aadc414b
Handle socket errors on Windows, which does not return 0 when a socket is disconnected like Linux does
6 years ago
Adam Honse
883a78ad9d
Fix client on Windows
6 years ago
Adam Honse
15d23d3009
Add client status update callback to NetworkClient
6 years ago
Adam Honse
e2c2b8c1df
Client will now close listener thread when disconnected and attempt to reconnect. Initialization behavior (controller requests, client string update) are performed automatically upon reconnection
6 years ago
Adam Honse
352b9928ca
Add file headers to network files and some minor code cleanup
6 years ago