SERVER.ADDR() |
![]() ![]() ![]() |
The SERVER.ADDR() function returns the IP address for a given server name.
Format
SERVER.ADDR(server.name)
where
The SERVER.ADDR() function can be used to find the IP address of a network server from its name. This function is not usually needed as the QMBasic socket functions work with either IP addresses or server names.
If successful, the STATUS() function will return zero. All error conditions return a null string as the IP address and subsequent use of the STATUS() function will return the error code.
Example
DISPLAY SERVER.ADDR("openqm.com")
This statement displays the IP address of the openqm.com server.
See also: ACCEPT.SOCKET.CONNECTION, CLOSE.SOCKET, CREATE.SERVER.SOCKET(), OPEN.SOCKET(), READ.SOCKET(), SET.SOCKET.MODE(), SOCKET.INFO(), WRITE.SOCKET() |