Exemplo n.º 1
0
        private async static Task<EpoxyTransport> SetupAsync()
        {
            var transport = new EpoxyTransportBuilder()
                .SetLogSink(new ConsoleLogger())
                .Construct();

            var assignAPortEndPoint = new IPEndPoint(IPAddress.Loopback, 0);

            var notifyService = new NotifyEventService();
            EpoxyListener notifyListener = transport.MakeListener(assignAPortEndPoint);
            notifyListener.AddService(notifyService);

            await notifyListener.StartAsync();

            s_connection = await transport.ConnectToAsync(notifyListener.ListenEndpoint, CancellationToken.None);

            return transport;
        }
Exemplo n.º 2
0
        private async static Task <EpoxyTransport> SetupAsync()
        {
            var transport = new EpoxyTransportBuilder()
                            .SetLogSink(new ConsoleLogger())
                            .Construct();

            var assignAPortEndPoint = new IPEndPoint(IPAddress.Loopback, EpoxyTransport.DefaultInsecurePort);

            var           notifyService  = new NotifyEventService();
            EpoxyListener notifyListener = transport.MakeListener(assignAPortEndPoint);

            notifyListener.AddService(notifyService);

            await notifyListener.StartAsync();

            s_connection = await transport.ConnectToAsync("epoxy://127.0.0.1", CancellationToken.None);

            return(transport);
        }
Exemplo n.º 3
0
        private async static Task <EpoxyTransport> SetupAsync()
        {
            var handler = new ConsoleLogger();

            Log.SetHandler(handler);

            var transport = new EpoxyTransportBuilder().Construct();

            var assignAPortEndPoint = new IPEndPoint(IPAddress.Loopback, 0);

            var           notifyService  = new NotifyEventService();
            EpoxyListener notifyListener = transport.MakeListener(assignAPortEndPoint);

            notifyListener.AddService(notifyService);

            await notifyListener.StartAsync();

            s_connection = await transport.ConnectToAsync(notifyListener.ListenEndpoint, CancellationToken.None);

            return(transport);
        }