Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Queries local IP.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Socket 8.0 Yes Yes Yes Yes Yes
MBS( "Socket.LocalIP"; SocketID )   More


Parameter Description Example value
SocketID The socket ID received by Socket.Connect function. $sock


Returns OK or error.


Queries local IP.
This is usually for a brand new socket.
Can return IPv4 or IPv6 address.
Does not work on Windows 7 or older (requires Vista on Windows).


Get local port and IP:

Set Variable [ $sock ; Value: MBS("Socket.Connect"; ""; 80) ]
Set Variable [ $$LocalPort ; Value: MBS( "Socket.LocalPort"; $sock ) ]
Set Variable [ $$LocalIP ; Value: MBS( "Socket.LocalIP"; $sock ) ]
Set Variable [ $r ; Value: MBS("Socket.Close"; $sock) ]

See also

Blog Entries

Created 28th December 2017, last changed 28th December 2017

Socket.Listen   -   Socket.LocalPort

Feedback: Report problem or ask question.

MBS Xojo Plugins