Commit Graph

25 Commits

Author SHA1 Message Date
Térence Clastres
b79ff124e6 Replace Sleep() by std::thread::sleep_for() 2020-06-24 09:28:11 -05:00
Adam Honse
0464fbcbe2 Make default SDK port a defined constant 2020-06-22 11:32:32 -05:00
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)
2020-06-20 14:39:14 -05:00
Adam Honse
f2c1022c7f Don't consider client online until it has been initialized 2020-06-15 22:41:33 -05:00
Adam Honse
cbb13b0d22 Add MacOS support to NetworkClient.cpp 2020-05-16 23:33:49 -07:00
Adam Honse
bd6ec4c41e Get client stop function working 2020-05-14 10:06:22 -05:00
Adam Honse
e6aadc414b Handle socket errors on Windows, which does not return 0 when a socket is disconnected like Linux does 2020-05-10 16:22:29 -05:00
Adam Honse
883a78ad9d Fix client on Windows 2020-05-10 16:16:59 -05:00
Adam Honse
15d23d3009 Add client status update callback to NetworkClient 2020-05-10 13:41:01 -05:00
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 2020-05-10 01:19:38 -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
dbe29991f0 Send client string after server is connected 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
9b8a0d465e Functions to set IP and port and start client 2020-05-09 15:48:15 -05:00
Adam Honse
04b87ce2eb Use std::thread for NetworkClient threads 2020-05-09 15:48:14 -05:00
Adam Honse
2bbf66c0ee Fix memory leaks in client 2020-05-09 15:48:14 -05:00
Adam Honse
d716973642 Get network client working on Windows 2020-05-09 15:48:14 -05:00
Adam Honse
39c5aff864 Send color data over the network when calling color update functions 2020-05-09 15:48:13 -05:00
Adam Honse
450f438538 Send mode data block when updating mode 2020-05-09 15:48:13 -05:00
Adam Honse
0270c745ce Implement RGBController_Network packet sending for current set of RGBController commands 2020-05-09 15:48:13 -05:00
Adam Honse
e2dfcd5b0f Client now requests list of all controllers from server and adds them to the master list 2020-05-09 15:48:13 -05:00
Adam Honse
cde7469191 Create functions for sending requests 2020-05-09 15:48:13 -05:00
Adam Honse
7c1a1396ca Client requests controller count and first controller data block from server, prints response 2020-05-09 15:48:13 -05:00
Adam Honse
dff667751b Start work on network client 2020-05-09 15:48:12 -05:00
Adam Honse
594f66ab23 Initial network files 2020-05-09 15:48:12 -05:00