コード例 #1
0
ファイル: NSStream.cs プロジェクト: tondat/xamarin-macios
        public static void CreateBoundPair(out NSInputStream readStream, out NSOutputStream writeStream, nint bufferSize)
        {
            IntPtr read, write;

            CFStream.CFStreamCreateBoundPair(IntPtr.Zero, out read, out write, bufferSize);
            AssignStreams(read, write, out readStream, out writeStream);
        }
コード例 #2
0
ファイル: NSStream.cs プロジェクト: tondat/xamarin-macios
 public static void CreatePairWithSocketToHost(IPEndPoint endpoint,
                                               out NSInputStream readStream,
                                               out NSOutputStream writeStream)
 {
     using (var host = CFHost.Create(endpoint)) {
         IntPtr read, write;
         CFStream.CFStreamCreatePairWithSocketToCFHost(IntPtr.Zero, host.Handle, endpoint.Port, out read, out write);
         AssignStreams(read, write, out readStream, out writeStream);
     }
 }
コード例 #3
0
ファイル: NSStream.cs プロジェクト: tondat/xamarin-macios
 public static void CreatePairWithPeerSocketSignature(AddressFamily family, SocketType type,
                                                      ProtocolType proto, IPEndPoint endpoint,
                                                      out NSInputStream readStream,
                                                      out NSOutputStream writeStream)
 {
     using (var address = new CFSocketAddress(endpoint)) {
         var    sig = new CFSocketSignature(family, type, proto, address);
         IntPtr read, write;
         CFStream.CFStreamCreatePairWithPeerSocketSignature(IntPtr.Zero, ref sig, out read, out write);
         AssignStreams(read, write, out readStream, out writeStream);
     }
 }
コード例 #4
0
ファイル: NSStream.cs プロジェクト: tondat/xamarin-macios
        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);
        }
コード例 #5
0
ファイル: NSStream.cs プロジェクト: tondat/xamarin-macios
 static void AssignStreams(IntPtr read, IntPtr write,
                           out NSInputStream readStream, out NSOutputStream writeStream)
 {
     readStream  = Runtime.GetNSObject <NSInputStream> (read);
     writeStream = Runtime.GetNSObject <NSOutputStream> (write);
 }
コード例 #6
0
 public static int WriteJSONObject(AnyObject obj, NSOutputStream toStream, NSJSONWritingOptions options, NSErrorPointer error)
 {
     return(default(int));
 }
コード例 #7
0
 public static int WritePropertyList(AnyObject plist, NSOutputStream toStream, NSPropertyListFormat format, NSPropertyListWriteOptions options, NSErrorPointer error)
 {
     return(default(int));
 }
コード例 #8
0
 public static nint WritePropertyList(NSObject plist, NSOutputStream stream, NSPropertyListFormat format, out NSError error)
 {
     return(WritePropertyList(plist, stream, format, NSPropertyListWriteOptions.Immutable, out error));
 }