# pipeTransport

**URL:** <https://mediasoup.discourse.group/t/pipetransport/5131>\
**Category:** mediasoup libraries\
**Created:** [April 5, 2023, 12:20pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131 "2023-04-05T12:20:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [April 5, 2023, 2:35pm UTC](https://mediasoup.discourse.group/t/pipetransport/5131/3 "2023-04-05T14:35:07Z")

</div>

If you are looking for piping within same server then it is really simple as mentioned here in docs:

> **[mediasoup :: API](https://mediasoup.org/documentation/v3/mediasoup/api/#router-pipeToRouter)**
>
> Cutting Edge WebRTC Video Conferencing

If you are looking for piping between servers then going through this source code file of mediasoup will help, you can see how they create the piping between routers:

> <https://github.com/versatica/mediasoup/blob/v3/node/src/Router.ts>

**And if you want me to simplify it then here it is:**  
We have two servers server 1, server 2. Producer 1 is on server 1 and we want this producer to be piped on server 2 so here are the steps:

- Create pipetransport on server 1, lets call is pipetransport 1
- Create pipetransport on server 2, lets call is pipetransport 2
- Exchange connect parameters of pipetransport 1, pipetransport 2 with eachother. Now they are connected
- Consume producer 1 on pipetransport 1 (from server 1), now pipetransport 1 is ready to give producer 1 to pipetransport 2
- Produce producer 1 on pipetransport 2, with the help of producer parameters from previous step, now pipetransport 2 have producer 1 and so does server 2
- Consume producer 1 from server 2 just like normal.

---

_[View the full topic](https://mediasoup.discourse.group/t/pipetransport/5131)._
