Map from a punch token to the UDP hole-punch attempt that two nodes share. More...
| Header: | #include <PunchRegistry> |
| Inherits: | QMap |
PunchRegistry is a QMap from a token string to a UDPPunch. A punch holds two PunchPartner slots. The two nodes that want a direct connection each report their public and local addresses under the same token, and each can then be given the addresses of the other. update() is the entry point that records one report.
update() creates the punch for a new token and adds the partner to it. It returns false when the punch already holds two other partners. The registry owns each punch. ZooServer declares one registry as a member, but nothing calls it yet.
See also PunchPartner.