Пример #1
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);
        }
Пример #2
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);
        }
Пример #3
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);
        }