mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] Various NT4 fixes (#4474)
* TopicListener: Fix Add() return values * Update PubSubOption poll storage documentation * Update NetworkTableEntry::GetValue() doc * Add documentation regarding asynchronous callbacks * Unpublish entry: set publisher to nullptr * Implement ValueListenerPoller default constructor * Remove SetNetworkIdentity, make parameter to StartClient * URI-escape client ID, improve error message * Add connected message with client id; also improve disconnected message a bit * Handle SetServers either before or after StartClient * Fix client use-after-free; also delay reconnect after disconnect to rate limit * Don't re-announce to already subscribed client; we especially don't want to send the last value again * Always accept in-order sets, only use timestamp for tiebreak * Fix LocalStorage::StartNetwork race * Remove unused/unimplemented function Also: * [glass] Remove debug print * [glass] Fix mpack string decoding * [cameraserver] Fix up startclient
This commit is contained in:
@@ -51,12 +51,10 @@ void bench() {
|
||||
// set up instances
|
||||
auto client = nt::CreateInstance();
|
||||
auto server = nt::CreateInstance();
|
||||
nt::SetNetworkIdentity(server, "server");
|
||||
nt::SetNetworkIdentity(client, "client");
|
||||
|
||||
// connect client and server
|
||||
nt::StartServer(server, "bench.json", "127.0.0.1", 0, 10000);
|
||||
nt::StartClient4(client);
|
||||
nt::StartClient4(client, "client");
|
||||
nt::SetServer(client, "127.0.0.1", 10000);
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
Reference in New Issue
Block a user