# Simplest example possible

**URL:** <https://react-native-webrtc.discourse.group/t/simplest-example-possible/302>\
**Category:** General\
**Created:** [October 17, 2019, 5:04am UTC](https://react-native-webrtc.discourse.group/t/simplest-example-possible/302 "2019-10-17T05:04:39Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![baconcheese113](https://yyz2.discourse-cdn.com/free1/user_avatar/react-native-webrtc.discourse.group/baconcheese113/32/123_2.png) [@baconcheese113](https://react-native-webrtc.discourse.group/u/baconcheese113)\
**Post date:** [January 20, 2020, 3:12am UTC](https://react-native-webrtc.discourse.group/t/simplest-example-possible/302/15 "2020-01-20T03:12:43Z")

</div>

Answered a similar question for another user [here](https://react-native-webrtc.discourse.group/t/testing-react-native-webrtc/436) recently.

Basically your backend will manage a ledger of created rooms from talking to all the clients through socket connections. This is where you can manage who users connect with.

The main objective is to successfully get an IceCandidate with a [session description protocol (sdp)](https://webrtchacks.com/sdp-anatomy/) object containing information about who they’re connecting to…to each of the clients in a room.

Believe it or not, the example project I made showcases all that ^ locally. I’m guessing that’s why it’s become so popular. Quite a bit easier to digest than a full stack example imo. Going from the local example to a networked one involves setting up a backend (like an nodejs + express + socketio server) and _slightly_ changing the webRTC flow.

Locally it’s:  
Nothing -\> (press share video) -\> Sharing local video -\> (press start call) -\> Call immediately negotiated and started

Networked it’s:  
Nothing -\> (press share video) -\> Sharing local video -\> (press start call) -\> Server puts client in a socketio room and you broadcast you’re there and start negotiating calls if needed and wait for others to broadcast when they join

[Here’s some of my code for how that negotiation works frontend](https://github.com/baconcheese113/chat2getherRN/blob/master/src/helpers/socketHelper.js#L101)

[And how that negotiation works backend](https://github.com/baconcheese113/chat2gether/blob/master/server/src/socket.js#L3)

---

_[View the full topic](https://react-native-webrtc.discourse.group/t/simplest-example-possible/302)._
