Refactored ConnectionType to make P2PConnection package-private.