It is an adaptation in Swift 5 of the code written in this great article : https://www.appcoda.com/chat-app-swift-tutorial/
Makes use of the multipeer connectivity framework in iOS that allows communication between devices on the same network : https://developer.apple.com/documentation/multipeerconnectivity It performs connection programatically without using the existing UI provided in the framework : MCBrowserViewController.