LocalHost Property

The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

Syntax

ANSI (Cross Platform)
char* GetLocalHost();
int SetLocalHost(const char* lpszLocalHost); Unicode (Windows) LPWSTR GetLocalHost();
INT SetLocalHost(LPCWSTR lpszLocalHost);
@property (nonatomic,readwrite,assign,getter=localHost,setter=setLocalHost:) NSString* localHost;
- (NSString*)localHost;
- (void)setLocalHost:(NSString*)newLocalHost;
#define PID_GOOGLESECRETS_LOCALHOST 14

CLOUDKEYS_EXTERNAL void* CLOUDKEYS_CALL CloudKeys_GoogleSecrets_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
CLOUDKEYS_EXTERNAL int CLOUDKEYS_CALL CloudKeys_GoogleSecrets_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

""

Remarks

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the class initiate connections (or accept in the case of server classs) only through that interface.

If the class is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 C++ Edition - Version 20.0 [Build 8157]