Example #1
0
        public static void CreatePairWithSocket(CFSocket socket,
            out NSInputStream readStream,
            out NSOutputStream writeStream)
        {
            if (socket == null)
                throw new ArgumentNullException ("socket");

            IntPtr read, write;
            CFStream.CFStreamCreatePairWithSocket (IntPtr.Zero, socket.GetNative (), out read, out write);
            AssignStreams (read, write, out readStream, out writeStream);
        }
Example #2
0
        public static void CreatePairWithSocket(CFSocket socket, out CFReadStream readStream,
            out CFWriteStream writeStream)
        {
            if (socket == null)
                throw new ArgumentNullException ("socket");

            IntPtr read, write;
            CFStreamCreatePairWithSocket (IntPtr.Zero, socket.GetNative (), out read, out write);
            readStream = new CFReadStream (read);
            writeStream = new CFWriteStream (write);
        }