getStreamsToHost(withName:port:inputStream:outputStream:)
Creates and returns by reference an NSInputStream object and NSOutputStream object for a socket connection with a given host on a given port.
Declaration
class func getStreamsToHost(withName hostname: String, port: Int, inputStream: AutoreleasingUnsafeMutablePointer<InputStream?>?, outputStream: AutoreleasingUnsafeMutablePointer<OutputStream?>?)Parameters
- hostname:
The host to which to connect.
- port:
The port to connect to on
host. - inputStream:
Upon return, contains the input stream. If
nilis passed, the stream object is not created. - outputStream:
Upon return, contains the output stream. If
nilis passed, the stream object is not created.