ios - Server socket with swift -


this question has answer here:

i want able have 1 ios-device multiple ios-devices (is there max?) able connect , send data(a string in case) first device.

i have tried tutorial: http://www.raywenderlich.com/3932/networking-tutorial-for-ios-how-to-create-a-socket-based-iphone-app-and-server have hard time understanding objective-c

actually, swift same objc. need port syntax objc swift:

func initnetworkcommunication() {     var readstream : unmanaged<cfreadstream>?;     var writestream : unmanaged<cfwritestream>?;     cfstreamcreatepairwithsockettohost(nil, "localhost", 80, &readstream, &writestream);     if let read = readstream {         inputstream = readstream!.takeunretainedvalue()     }     if let write = writestream {        outputstream = writestream!.takeunretainedvalue()     } } 

and on...


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -