How to send response after reading request from browser with Socket ? (I'm using SwiftSocket)
问题 I am new to this networking in iOS so doesn't know all the concepts so well and I'm making an app which allows to show data on browser which is on device, For that I'm creating a socket-port and using SwiftSocket library override func viewDidLoad() { super.viewDidLoad() let ip = String(getAddress(for: .wifi)!) self.host = ip print("Getting IP address of wifi\n\(self.host)\n") self.selfserver() } I think following function selfserver() initialises the server and wait for the client to connect