From ad517eb1df8841db52a45c7ac9ecf5976a290d57 Mon Sep 17 00:00:00 2001 From: "Gregory Mullen (grayhatter)" Date: Fri, 11 Nov 2016 03:10:24 -0800 Subject: add NAT hole punching level to Tox API --- toxcore/tox.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'toxcore/tox.h') diff --git a/toxcore/tox.h b/toxcore/tox.h index ef738422..d6f6fb2f 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -575,6 +575,12 @@ struct Tox_Options { uint16_t tcp_port; + /** + * Enables or disables UDP hole-punching in toxcore. (Default: enabled). + */ + bool hole_punching_enabled; + + /** * The type of savedata to load from. */ @@ -642,6 +648,10 @@ uint16_t tox_options_get_tcp_port(const struct Tox_Options *options); void tox_options_set_tcp_port(struct Tox_Options *options, uint16_t tcp_port); +bool tox_options_get_hole_punching_enabled(const struct Tox_Options *options); + +void tox_options_set_hole_punching_enabled(struct Tox_Options *options, bool hole_punching_enabled); + TOX_SAVEDATA_TYPE tox_options_get_savedata_type(const struct Tox_Options *options); void tox_options_set_savedata_type(struct Tox_Options *options, TOX_SAVEDATA_TYPE type); -- cgit v1.2.3