diff options
author | cotox <39076296+cotox@users.noreply.github.com> | 2018-06-26 11:45:17 +0000 |
---|---|---|
committer | cotox <39076296+cotox@users.noreply.github.com> | 2018-06-26 11:45:17 +0000 |
commit | 5b14542d3b5af207170536c3e84fd80f6035cc03 (patch) | |
tree | 0b422a2389028102659f3b6cfac61f4023d3684c /toxcore/tox.h | |
parent | ae7899cab8104fa3c3078a3e61ddfa58a826e39a (diff) |
Make arg `host` understand clearly.
Rename args `host:port` from `address:port`.
The *address* is well known as *Tox Address* in this project. Then we
should reserve *addres* to it, and use *host* to express the hostname or
IP address in TCP domain.
Diffstat (limited to 'toxcore/tox.h')
-rw-r--r-- | toxcore/tox.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/toxcore/tox.h b/toxcore/tox.h index 468113d9..f8cb5e5a 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h | |||
@@ -905,7 +905,7 @@ typedef enum TOX_ERR_BOOTSTRAP { | |||
905 | TOX_ERR_BOOTSTRAP_NULL, | 905 | TOX_ERR_BOOTSTRAP_NULL, |
906 | 906 | ||
907 | /** | 907 | /** |
908 | * The address could not be resolved to an IP address, or the IP address | 908 | * The hostname could not be resolved to an IP address, or the IP address |
909 | * passed was invalid. | 909 | * passed was invalid. |
910 | */ | 910 | */ |
911 | TOX_ERR_BOOTSTRAP_BAD_HOST, | 911 | TOX_ERR_BOOTSTRAP_BAD_HOST, |
@@ -925,7 +925,7 @@ typedef enum TOX_ERR_BOOTSTRAP { | |||
925 | * This function will attempt to connect to the node using UDP. You must use | 925 | * This function will attempt to connect to the node using UDP. You must use |
926 | * this function even if Tox_Options.udp_enabled was set to false. | 926 | * this function even if Tox_Options.udp_enabled was set to false. |
927 | * | 927 | * |
928 | * @param address The hostname or IP address (IPv4 or IPv6) of the node. Must be | 928 | * @param host The hostname or IP address (IPv4 or IPv6) of the node. Must be |
929 | * at most TOX_MAX_HOSTNAME_LENGTH chars, including the NUL byte. | 929 | * at most TOX_MAX_HOSTNAME_LENGTH chars, including the NUL byte. |
930 | * @param port The port on the host on which the bootstrap Tox instance is | 930 | * @param port The port on the host on which the bootstrap Tox instance is |
931 | * listening. | 931 | * listening. |
@@ -933,7 +933,7 @@ typedef enum TOX_ERR_BOOTSTRAP { | |||
933 | * (TOX_PUBLIC_KEY_SIZE bytes). | 933 | * (TOX_PUBLIC_KEY_SIZE bytes). |
934 | * @return true on success. | 934 | * @return true on success. |
935 | */ | 935 | */ |
936 | bool tox_bootstrap(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key, TOX_ERR_BOOTSTRAP *error); | 936 | bool tox_bootstrap(Tox *tox, const char *host, uint16_t port, const uint8_t *public_key, TOX_ERR_BOOTSTRAP *error); |
937 | 937 | ||
938 | /** | 938 | /** |
939 | * Adds additional host:port pair as TCP relay. | 939 | * Adds additional host:port pair as TCP relay. |
@@ -942,14 +942,13 @@ bool tox_bootstrap(Tox *tox, const char *address, uint16_t port, const uint8_t * | |||
942 | * the same bootstrap node, or to add TCP relays without using them as | 942 | * the same bootstrap node, or to add TCP relays without using them as |
943 | * bootstrap nodes. | 943 | * bootstrap nodes. |
944 | * | 944 | * |
945 | * @param address The hostname or IP address (IPv4 or IPv6) of the TCP relay. | 945 | * @param host The hostname or IP address (IPv4 or IPv6) of the TCP relay. |
946 | * @param port The port on the host on which the TCP relay is listening. | 946 | * @param port The port on the host on which the TCP relay is listening. |
947 | * @param public_key The long term public key of the TCP relay | 947 | * @param public_key The long term public key of the TCP relay |
948 | * (TOX_PUBLIC_KEY_SIZE bytes). | 948 | * (TOX_PUBLIC_KEY_SIZE bytes). |
949 | * @return true on success. | 949 | * @return true on success. |
950 | */ | 950 | */ |
951 | bool tox_add_tcp_relay(Tox *tox, const char *address, uint16_t port, const uint8_t *public_key, | 951 | bool tox_add_tcp_relay(Tox *tox, const char *host, uint16_t port, const uint8_t *public_key, TOX_ERR_BOOTSTRAP *error); |
952 | TOX_ERR_BOOTSTRAP *error); | ||
953 | 952 | ||
954 | /** | 953 | /** |
955 | * Protocols that can be used to connect to the network or friends. | 954 | * Protocols that can be used to connect to the network or friends. |