示例#1
0
 public void Basic()
 {
     Fixture.TestIterate(() =>
     {
         var url = UrlIpc();
         using (var pub = Factory.PublisherOpen().Unwrap())
         {
             pub.Listen(url).Unwrap();
             using (var socket = Factory.SubscriberOpen().Unwrap())
                 using (var dialer = socket.DialerCreate(url).Unwrap())
                 {
                     Assert.NotNull(dialer);
                     Assert.Equal(0, dialer.Start());
                 }
         }
     });
 }
        public async Task Basic(string url)
        {
            Fixture.TestIterate(() =>
            {
                using (var bus0 = Factory.SurveyorCreate(url, true).Unwrap())
                    using (var bus1 = Factory.RespondentCreate(url, false).Unwrap())
                    {
                    }

                // Manually create listener/dialer
                using (var bus0 = Factory.SurveyorOpen().Unwrap())
                    using (var listener0 = Factory.ListenerCreate(bus0, url))
                    {
                        using (var bus1 = Factory.RespondentOpen().Unwrap())
                            using (var dialer1 = Factory.DialerCreate(bus1, url))
                            {
                            }
                    }
            });
        }
示例#3
0
        public async Task Basic(string url)
        {
            Fixture.TestIterate(() =>
            {
                using (var bus0 = Factory.BusOpen().Unwrap())
                    using (var bus1 = Factory.BusOpen().Unwrap())
                    {
                        var listener = bus0.ListenWithListener(url).Unwrap();
                        bus1.Dial(GetDialUrl(listener, url)).Unwrap();
                    }

                // Manually create listener/dialer
                using (var bus0 = Factory.BusOpen().Unwrap())
                    using (var listener0 = bus0.ListenerCreate(url).Unwrap())
                    {
                        using (var bus1 = Factory.BusOpen().Unwrap())
                            using (var dialer1 = bus1.DialerCreate(GetDialUrl(listener0, url)).Unwrap())
                            {
                            }
                    }
            });
        }
示例#4
0
        public async Task Basic(string url)
        {
            Fixture.TestIterate(() =>
            {
                using (var push = Factory.PusherOpen().Unwrap())
                    using (var pull = Factory.PullerOpen().Unwrap())
                    {
                        var listener = push.ListenWithListener(url).Unwrap();
                        pull.Dial(GetDialUrl(listener, url)).Unwrap();
                    }

                // Manually create listener/dialer
                using (var push = Factory.PusherOpen().Unwrap())
                    using (var listener0 = push.ListenerCreate(url).Unwrap())
                    {
                        // Must start listener before using `NNG_OPT_LOCADDR`
                        listener0.Start();
                        using (var pull = Factory.PullerOpen().Unwrap())
                            using (var dialer1 = pull.DialerCreate(GetDialUrl(listener0, url)).Unwrap())
                            {
                            }
                    }
            });
        }
示例#5
0
 public Task ReqRepBasic(string url)
 {
     return(Fixture.TestIterate(() => DoReqRepBasic(url)));
 }
示例#6
0
 public async Task SurveyorFail(string url)
 {
     await Fixture.TestIterate(() => DoSurveyorFail(url));
 }
示例#7
0
 public Task Pair(string url)
 {
     return(Fixture.TestIterate(() => DoPair(url)));
 }
示例#8
0
 public void DuplicateUrl(string url)
 {
     Fixture.TestIterate(() => DoDuplicateUrl(url));
 }
示例#9
0
 public Task Nonblock(string url)
 {
     return(Fixture.TestIterate(() => DoNonblock(url)));
 }
示例#10
0
 public Task PushPull(string url)
 {
     return(Fixture.TestIterate(() => DoPushPull(url)));
 }
示例#11
0
 public Task PubSub(string url)
 {
     return(Fixture.TestIterate(() => DoPubSub(url)));
 }