Using SLProtocol.GetConnectivityConnections I can get a collection of ConnectivityConnection objects that describe all connections of an element, but there is no indication whether the connection is internal or external.
Checking if source and destination are the same element is also not a perfect solution, as an external connection looping back will be wrongly flagged as internal.
I have noticed that the method uses GetElementInterfaceConnectionsByIDMessage, and the InterfaceConnectionInfoEventMessage response does contain that information in the InterfaceConnectionInfo objects, those are also used to create the ConnectivityConnection objects.
Is there any other way to know if a connection is internal preferably without sending SLNet messages or without relying on reflection?
The raw (SLNet) object contains an additional boolean property called Physical which marks the external loop-back connection.
Checking if a connection is internal can be done by:
!Phsyical && Source == Destination