Xojo Plugin
Xojo Plugin
Get Local Network Adapter Addresses
See more Socket/SSL/TLS Examples
Demonstrates Socket.GetAdaptersAddresses, which populates a JsonObject with information about local network adapters, including IPv4 addresses, IPv6 addresses, and MAC addresses.
Tip: Code to parse the returned JSON can be generated with Chilkat's online tool at https://tools.chilkat.io/jsonParse.
Background. This provides a portable way to enumerate the host's network interfaces and their addresses.
Chilkat Xojo Plugin Downloads
Dim success As Boolean
success = False
Dim socket As New Chilkat.Socket
// Populate a JsonObject with information about the local network adapters, including IPv4 addresses,
// IPv6 addresses, and MAC addresses.
Dim json As New Chilkat.JsonObject
success = socket.GetAdaptersAddresses(json)
If (success = False) Then
System.DebugLog(socket.LastErrorText)
Return
End If
json.EmitCompact = False
Dim jsonStr As String
jsonStr = json.Emit()
System.DebugLog(jsonStr)
// JSON parsing code for this result can be generated at Chilkat's online tool:
// https://tools.chilkat.io/jsonParse