I have couple of minor issues which I couldn't resolve, not after more than 10 hours of searching and reading materials.
I'm aiming to build an app for some company that needs simple things working, such as: Sockets and Streams.
With streams, I'm trying to understand how to use NSInputStream read function.
If I compare this to Java, all I had to do is initialize the InputStream with some kind of source stream to read from, and just use the read method to read 1 byte - simple is that.
In Swift it's not like that, the read method receives some kind of CMutablePointer object which I know nothing about (couldn't find a satisfiable material about it) and therefore I cannot use it at all.
If someone could show me a code example writing in Swift language of how to read bytes from an NSInputStream (or any other kind of input stream available in Swift) I'd be really happy.
Second thing is Sockets.
Again, if we want to use Sockets in Java, you have to initialize it with remote address and then use the getInputStream and getOutputStream methods to have your infrastructure for communicating with the remote server.
In Swift, you don't have these simple options, how would you do that instead then?
I really appreciate any help for solving one of these issues.