How does libp2p handle incoming connections on different protocols in javascript land?

Libp2p has a bunch of different transport layers in javascript.

How does it manage delegating an incoming connection to the proper transport?

What are the wrinkles here?

Would I be able to have a libp2p node listen on the same address and port for a tcp connection and a ws connection, as inn ip4/0.0.0.0/tcp/0 and ip4/0.0.0.0/tcp/0/ws? With a quick experimentation that appears to fail at the point of dialing, I assume it fails silently when trying to set up the server.

Is there a bootstrap protocol that first listens to understand how to make a connection?

Or does it derive a new server from the designated multiaddr, and connects different servers such that they all behave as the same node with a given peer info?

Seems like the latter.