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.api.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.api.h')
-rw-r--r-- | toxcore/tox.api.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h index 8ed05a7e..694d7465 100644 --- a/toxcore/tox.api.h +++ b/toxcore/tox.api.h | |||
@@ -756,7 +756,7 @@ uint8_t[size] savedata { | |||
756 | * This function will attempt to connect to the node using UDP. You must use | 756 | * This function will attempt to connect to the node using UDP. You must use |
757 | * this function even if ${options.this.udp_enabled} was set to false. | 757 | * this function even if ${options.this.udp_enabled} was set to false. |
758 | * | 758 | * |
759 | * @param address The hostname or IP address (IPv4 or IPv6) of the node. Must be | 759 | * @param host The hostname or IP address (IPv4 or IPv6) of the node. Must be |
760 | * at most $MAX_HOSTNAME_LENGTH chars, including the NUL byte. | 760 | * at most $MAX_HOSTNAME_LENGTH chars, including the NUL byte. |
761 | * @param port The port on the host on which the bootstrap Tox instance is | 761 | * @param port The port on the host on which the bootstrap Tox instance is |
762 | * listening. | 762 | * listening. |
@@ -764,10 +764,10 @@ uint8_t[size] savedata { | |||
764 | * ($PUBLIC_KEY_SIZE bytes). | 764 | * ($PUBLIC_KEY_SIZE bytes). |
765 | * @return true on success. | 765 | * @return true on success. |
766 | */ | 766 | */ |
767 | bool bootstrap(string address, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] public_key) { | 767 | bool bootstrap(string host, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] public_key) { |
768 | NULL, | 768 | NULL, |
769 | /** | 769 | /** |
770 | * The address could not be resolved to an IP address, or the IP address | 770 | * The hostname could not be resolved to an IP address, or the IP address |
771 | * passed was invalid. | 771 | * passed was invalid. |
772 | */ | 772 | */ |
773 | BAD_HOST, | 773 | BAD_HOST, |
@@ -785,13 +785,13 @@ bool bootstrap(string address, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] pub | |||
785 | * the same bootstrap node, or to add TCP relays without using them as | 785 | * the same bootstrap node, or to add TCP relays without using them as |
786 | * bootstrap nodes. | 786 | * bootstrap nodes. |
787 | * | 787 | * |
788 | * @param address The hostname or IP address (IPv4 or IPv6) of the TCP relay. | 788 | * @param host The hostname or IP address (IPv4 or IPv6) of the TCP relay. |
789 | * @param port The port on the host on which the TCP relay is listening. | 789 | * @param port The port on the host on which the TCP relay is listening. |
790 | * @param public_key The long term public key of the TCP relay | 790 | * @param public_key The long term public key of the TCP relay |
791 | * ($PUBLIC_KEY_SIZE bytes). | 791 | * ($PUBLIC_KEY_SIZE bytes). |
792 | * @return true on success. | 792 | * @return true on success. |
793 | */ | 793 | */ |
794 | bool add_tcp_relay(string address, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] public_key) | 794 | bool add_tcp_relay(string host, uint16_t port, const uint8_t[PUBLIC_KEY_SIZE] public_key) |
795 | with error for bootstrap; | 795 | with error for bootstrap; |
796 | 796 | ||
797 | 797 | ||