Go over about the first half of the 'hostname' mentions and decide whether they need to specify something like 'hostname or IP address' or whether 'address' would be a more-self-evident term

This commit is contained in:
idk
2021-02-01 23:51:28 -05:00
parent fdb4ec7d7c
commit f7934e2ed5
6 changed files with 31 additions and 31 deletions

View File

@ -352,7 +352,7 @@ public interface I2PSession {
* Ask the router to lookup a Destination by hostname.
* Blocking. Waits a max of 10 seconds by default.
*
* This only makes sense for a b32 hostname, OR outside router context.
* This only makes sense for a b32 address, OR outside router context.
* Inside router context, just query the naming service.
* Outside router context, this does NOT query the context naming service.
* Do that first if you expect a local addressbook.

View File

@ -300,10 +300,10 @@ class SubSession extends I2PSessionMuxedImpl {
}
/**
* Ask the router to lookup a Destination by hostname.
* Ask the router to lookup a Destination by address.
* Blocking. Waits a max of 10 seconds by default.
*
* This only makes sense for a b32 hostname, OR outside router context.
* This only makes sense for a b32 address, OR outside router context.
* Inside router context, just query the naming service.
* Outside router context, this does NOT query the context naming service.
* Do that first if you expect a local addressbook.

View File

@ -89,22 +89,22 @@ public abstract class NamingService {
public String reverseLookup(Hash h) { return null; }
/**
* If the hostname is a valid Base64 encoded destination, return the
* If the address is a valid Base64 encoded destination, return the
* decoded Destination. Useful as a "fallback" in custom naming
* implementations.
* This is misnamed as it isn't a "lookup" at all, but
* a simple conversion from a Base64 string to a Destination.
*
* @param hostname 516+ character Base 64
* @param address 516+ character Base 64
* @return Destination or null on error
*/
protected Destination lookupBase64(String hostname) {
protected Destination lookupBase64(String address) {
try {
Destination result = new Destination();
result.fromBase64(hostname);
result.fromBase64(address);
return result;
} catch (DataFormatException dfe) {
if (_log.shouldLog(Log.WARN)) _log.warn("Bad B64 dest [" + hostname + "]", dfe);
if (_log.shouldLog(Log.WARN)) _log.warn("Bad B64 dest [" + address + "]", dfe);
return null;
}
}
@ -534,12 +534,12 @@ public abstract class NamingService {
* This implementation returns null.
* See also lookup(Hash, int).
*
* @param hostname must be {52 chars}.b32.i2p
* @param address must be {52 chars}.b32.i2p
* @param timeout in seconds; <= 0 means use router default
* @return dest or null
* @since 0.8.7
*/
public Destination lookupBase32(String hostname, int timeout) {
public Destination lookupBase32(String address, int timeout) {
return null;
}

View File

@ -34,7 +34,7 @@ public class SOCKS5Client {
* Caller must close sock on success.
*
* @param sock socket to the proxy
* @param connHostName hostname for the proxy to connect to
* @param connHostName hostname or IP for the proxy to connect to
* @param connPort port for the proxy to connect to
*/
public static void connect(Socket sock, String connHostName, int connPort) throws IOException {
@ -48,7 +48,7 @@ public class SOCKS5Client {
* Caller must close sock on success.
*
* @param sock socket to the proxy
* @param connHostName hostname for the proxy to connect to
* @param connHostName hostname or IP for the proxy to connect to
* @param connPort port for the proxy to connect to
* @param configUser username for proxy authentication or null
* @param configPW password for proxy authentication or null
@ -76,7 +76,7 @@ public class SOCKS5Client {
*
* @param pin input stream from the proxy
* @param pout output stream to the proxy
* @param connHostName hostname for the proxy to connect to
* @param connHostName hostname or IP for the proxy to connect to
* @param connPort port for the proxy to connect to
*/
public static void connect(InputStream pin, OutputStream pout, String connHostName, int connPort) throws IOException {
@ -91,7 +91,7 @@ public class SOCKS5Client {
*
* @param pin input stream from the proxy
* @param pout output stream to the proxy
* @param connHostName hostname for the proxy to connect to
* @param connHostName hostname or IP for the proxy to connect to
* @param connPort port for the proxy to connect to
* @param configUser username for proxy authentication or null
* @param configPW password for proxy authentication or null

View File

@ -390,8 +390,8 @@ public abstract class Addresses {
/**
* Caching version of InetAddress.getByName(host).getAddress(), which is slow.
* Caches numeric hostnames only.
* Will resolve but not cache DNS hostnames.
* Caches numeric addresses only.
* Will resolve but not cache DNS addresses.
*
* Unlike InetAddress.getByName(), we do NOT allow numeric IPs
* of the form d.d.d, d.d, or d, as these are almost certainly mistakes.
@ -402,7 +402,7 @@ public abstract class Addresses {
* InetAddress.getByName() also returns 127.0.0.1 for a host "",
* but this is undocumented; as of 0.9.49, here we return null.
*
* @param host DNS or IPv4 or IPv6 hostname; if null or empty returns null
* @param host DNS or IPv4 or IPv6 address; if null or empty returns null
* @return IP or null
* @since 0.9.3
*/
@ -480,7 +480,7 @@ public abstract class Addresses {
* else the other type if available.
* Will resolve but not cache DNS hostnames.
*
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
* @param host DNS or IPv4 or IPv6 address; if null returns null
* @return IP or null
* @since 0.9.28
*/
@ -533,7 +533,7 @@ public abstract class Addresses {
* Number of results may also change based on caching at various layers,
* even if the ultimate name server results did not change.
*
* @param host DNS or IPv4 or IPv6 hostname; if null returns null
* @param host DNS or IPv4 or IPv6 address; if null returns null
* @return non-empty list IPs, or null if none
* @since 0.9.28
*/