Macos 从调度io创建NSStream

Macos 从调度io创建NSStream,macos,cocoa,grand-central-dispatch,nsstream,Macos,Cocoa,Grand Central Dispatch,Nsstream,如何从分派io创建NSStream /*! * @typedef dispatch_io_t * A dispatch I/O channel represents the asynchronous I/O policy applied to a * file descriptor. I/O channels are first class dispatch objects and may be * retained and released, suspended and resumed

如何从分派io创建NSStream

/*!
 * @typedef dispatch_io_t
 * A dispatch I/O channel represents the asynchronous I/O policy applied to a
 * file descriptor. I/O channels are first class dispatch objects and may be
 * retained and released, suspended and resumed, etc.
 */
DISPATCH_DECL(dispatch_io);

你到底想在这里干什么?这两件事之间没有一般的“转换”,因此任何解决方案都取决于情况/上下文。我需要使用NSStream,通过连接来流式传输数据文件,不幸的是,lib使用dispatch_io___________________________________________?i、 e.从
PTChannel
接收数据,将数据重新传输到
NSStream
,反之亦然?在AICT中,您应该能够做到这一点,而无需触摸底层的
dispatch\u io\t
。例如,peertalk示例应用程序的iOS和OS X端都从未接触过
调度io\u t
。我为此创建了一个新版本