TCPGetMyAddr

Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO All

Syntax

TCPGetMyAddr ([socket {Default 0}, ipv6 {Default kFalse}]) Returns address

Description

Note: The flag is set according to whether Omnis was able to make a call to this external command.

This Web command is multi-threaded, allowing another thread to execute in the multi-threaded server while it runs. Note that the same socket cannot safely be used concurrently by more than one thread.

TCPGetMyAddr is a domain name service command to resolve the IP address of the local computer running Omnis.

You can optionally pass a Socket, which corresponds to an open connection. In this case, the command returns the local IP address bound to the local endpoint of the connection. There are two cases where this is useful.

Address is an Omnis Character field which receives the IP Address of the local host. The IP address is of the form 255.255.255.254

Possible error codes are listed in the Web Command Error Codes Appendix.

Example

; Return the IP address of this machine
TCPGetMyAddr Returns lIPAddress
Quit method lIPAddress