Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Original geschrieben von reima
Sollte mit der Winsock2-Funktion gethostbyname() realisierbar sein. Näheres dazu in der MSDN-Library.
Hm, nur aus reinem Interesse, theoretisch würde es in *n?x mit gethostbyname() auch funktionieren, oder? WinSock kommt ja von der Unix-Ecke, wenn ich mich nicht ganz täusche...Original geschrieben von HolyFly
UNIX/Linux einfach
das Tool host nutzen.
host [ip]
Original geschrieben von reima
Hm, nur aus reinem Interesse, theoretisch würde es in *n?x mit gethostbyname() auch funktionieren, oder? WinSock kommt ja von der Unix-Ecke, wenn ich mich nicht ganz täusche...
Da stehts doch. Wenn du einen int Return wert hast dann vergleich ihn doch mit jenen Konstanten:If no error occurs, this function returns a pointer to the hostent structure. If an error occurs, it returns a NULL pointer, and a specific error number can be retrieved by calling WSAGetLastError.
The following table shows the possible error codes.
Error code Description
WSANOTINITIALISED A successful WSAStartup call must occur before using this function.
WSAENETDOWN The network subsystem has failed.
WSAHOST_NOT_FOUND An authoritative answer host was not found.
WSATRY_AGAIN A nonauthoritative host was not found, or the server failure.
WSANO_RECOVERY A nonrecoverable error occurred.
WSANO_DATA A valid name exists, but no data record of the requested type exists.
WSAEINPROGRESS A blocking Winsock call is in progress, or the service provider is still processing a callback function.
WSAEFAULT The name parameter is not a valid part of the user address space.
WSAEINTR The socket was closed.
switch(errocode) {
case WSANOTINITIALISED:
// tu jenes
break;
case WSAENETDOWN:
// tu dieses
break:
...
}