Skip to content

Is a NetworkTables server's connection listener always called after any preconfigured subscriptions from the connecting client are in place #6700

Answered by PeterJohnson
brettle asked this question in Q&A
Discussion options

You must be logged in to vote

(1) is not guaranteed, as it has a race condition. The connection notification occurs when the connection handshake completes; it does not wait for any messages from the client beyond the handshake (e.g. subscribe messages).

(2) Yes, this would work. The network messages are sent in order from the client, the preconfigured subscriptions are sent before any other messages/callbacks, and the messages are processed in order on the server.

(3) Would work as well. It's on the TODO list to add a nice API for doing this. Note that $sub$<topic> is also available to have (many) fewer things to look at.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brettle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants