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

**URL:** <https://discuss.ipfs.tech/t/how-does-libp2p-handle-incoming-connections-on-different-protocols-in-javascript-land/3693>\
**Category:** Help\
**Created:** [August 22, 2018, 12:43pm UTC](https://discuss.ipfs.tech/t/how-does-libp2p-handle-incoming-connections-on-different-protocols-in-javascript-land/3693 "2018-08-22T12:43:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![realization](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@realization](https://discuss.ipfs.tech/u/realization)\
**Post date:** [August 22, 2018, 12:43pm UTC](https://discuss.ipfs.tech/t/how-does-libp2p-handle-incoming-connections-on-different-protocols-in-javascript-land/3693/1 "2018-08-22T12:43:26Z")

</div>

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.
