10#if !defined(OWL_WSKHOSTM_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
30#define WINSOCK_NOERROR (int)0
31#define WINSOCK_ERROR (int)SOCKET_ERROR
36#define N_MAX_HOST_NAME 128
37#define MSG_HOST_INFO_NOTIFY ((UINT)(WM_USER+303))
102 char * chBuffer = 0);
105 char * chBuffer = 0);
THostEntry encapsulates the attributes of a host (hostent).
ulong GetINetAddress()
Returns the Internet address of the host.
int GetAddressCount()
Returns the number of pointers to addresses in the hostent (parent class of THostEntry).
ulong GetNthINetAddress(int nIndex=0)
An internet addressing -specific function.
THostEntry()
Constructor of THostEntry object. Initializes members describing host to 0.
The THostInfoManager class (and its friend class THostInfoWindow) encapsulate the Winsock database fu...
THostInfoManager()
This function initializes the hidden window.
short GetHostRequestCompleted()
This function returns true if the host completed the last requested transaction.
int CancelHostRequest(HANDLE hTheHostRequest=0)
The caller can use this call to cancel the last pending request.
static int HostEntryToAddress(THostEntry *hEntry, char *szAddress)
Given a THostEntry*, this function converts it to a dotted-decimal szAddress.
int GetHostAddress(char *szHostAddress, const char *szHostName)
This function effectively converts szHostName to szHostAddress.
HANDLE HostRequest
Handle of host to get info about.
int LastError
Last error code.
bool HostRequestCompleted
Flag if host completed last request.
char HostInfoBuffer[MAXGETHOSTSTRUCT]
Used for calls to WSAAsync...().
int GetHostInfo(THostEntry *&hEntry, const TSocketAddress &sAddress)
The caller of this function supplies a pointer to be assigned by this function.
friend class THostInfoWindow
int GetHostName(char *name, int nameLength=N_MAX_HOST_NAME)
This function returns the name of the computer on which this program is running.
int GetHostInfoAsync(HANDLE &hTheHostRequest, TSocketAddress &sAddress)
The TheHostRequest parameter is returned to the caller with the asynchrous request handle.
THostInfoWindow HostWindow
Hidden window to catch notifications.
int GetLastError()
This function returns the last error code.
void SetHostRequestCompleted(int error)
This function is called whenever an asynchronous request is completed.
THostInfoWindow(THostInfoManager *hostInfoManagerParent)
The HostInfoWindow requires a HostInfoManager, so it can relay messages to it.
TResult DoNotification(TParam1, TParam2)
This is a relay function.
The TSocketAddress class stores a Winsock socket address.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
TWindow(TWindow *parent, LPCTSTR title=nullptr, TModule *module=nullptr)
Adds this to the child list of parent if nonzero, and calls EnableAutoCreate so that this will be cre...
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
General definitions used by all ObjectWindows programs.
Base window class TWindow definition, including HWND encapsulation.
Main header of the Winsock OWL subsystem.
#define MSG_HOST_INFO_NOTIFY