Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public override void DidReceiveStream(MCSession session, Foundation.NSInputStream stream, string streamName, MCPeerID peerID)
        {
            AppDelegate.PeerHistoryMonitor[peerID.DisplayName].LastReceiveStream = DateTime.UtcNow;

            System.Diagnostics.Debug.WriteLine("MCSessionDelegate ** DidReceiveStream");
            InvokeOnMainThread(() => new UIAlertView("Msg", "DidReceiveStream()", null, "OK", null).Show());
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 static void AssignStreams(IntPtr read, IntPtr write,
                           out NSInputStream readStream, out NSOutputStream writeStream)
 {
     readStream  = Runtime.GetNSObject <NSInputStream> (read);
     writeStream = Runtime.GetNSObject <NSOutputStream> (write);
 }
Exemplo n.º 7
0
 public static AnyObject JSONObjectWithStream(NSInputStream stream, NSJSONReadingOptions options, NSErrorPointer error)
 {
     return(default(AnyObject));
 }
Exemplo n.º 8
0
 public NSXMLParser(NSInputStream stream)
 {
 }
Exemplo n.º 9
0
 public static AnyObject PropertyListWithStream(NSInputStream stream, NSPropertyListReadOptions options, UnsafeMutablePointer <NSPropertyListFormat> format, NSErrorPointer error)
 {
     return(default(AnyObject));
 }
 public static NSObject PropertyListWithStream(NSInputStream stream, ref NSPropertyListFormat format, out NSError error)
 {
     return(PropertyListWithStream(stream, NSPropertyListReadOptions.Immutable, ref format, out error));
 }