ls1intum / sReto

P2P Framework for realtime collaboration in Swift
http://www1.in.tum.de
MIT License
91 stars 25 forks source link

Where is peer.accept ? #7

Closed jhoughjr closed 7 years ago

krusche commented 7 years ago

Hi Jimmy,

the idea is that you do not accept peers, you accept the underlying connection between peers that can over WiFi, Bluetooth or Websockets.

Have a look at the SimpleChat Example. In the ChatRoom’s class init method the remotePeer connects and then waits for incoming connections using the closure onConnecttion (Line 69). If the framework detects a new connection, the closure is invoked and you can decide whether you how to handle it.

Hope this helps!

Best, Stephan