mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Support client round robin to multiple server addresses.
Change-Id: If87dc64a485b1c8a340c5f6fa39ca09d40133e30
This commit is contained in:
@@ -26,7 +26,7 @@ class NetworkTable : public ITable {
|
||||
typedef std::pair<ITableListener*, unsigned int> Listener;
|
||||
std::vector<Listener> m_listeners;
|
||||
|
||||
static std::string s_ip_address;
|
||||
static std::vector<std::string> s_ip_addresses;
|
||||
static std::string s_persistent_filename;
|
||||
static bool s_client;
|
||||
static bool s_running;
|
||||
@@ -74,6 +74,12 @@ class NetworkTable : public ITable {
|
||||
*/
|
||||
static void SetIPAddress(llvm::StringRef address);
|
||||
|
||||
/**
|
||||
* @param addresses the addresses that network tables will connect to in
|
||||
* client mode (in round robin order)
|
||||
*/
|
||||
static void SetIPAddress(llvm::ArrayRef<std::string> addresses);
|
||||
|
||||
/**
|
||||
* @param port the port number that network tables will connect to in client
|
||||
* mode or listen to in server mode
|
||||
|
||||
Reference in New Issue
Block a user