Esempio n. 1
0
        public async Task ping_happy_path_with_tcp()
        {
            using (var runtime = JasperRuntime.For(_ => { _.Transports.LightweightListenerAt(2222); }))
            {
                var sender = new BatchedSender("tcp://localhost:2222".ToUri(), new SocketSenderProtocol(),
                                               CancellationToken.None, TransportLogger.Empty());

                sender.Start(new StubSenderCallback());

                await sender.Ping();
            }
        }
Esempio n. 2
0
        public BatchedSenderTests()
        {
            theSender = new BatchedSender(TransportConstants.RepliesUri, theProtocol, theCancellation.Token, TransportLogger.Empty());
            theSender.Start(theSenderCallback);

            theBatch = new OutgoingMessageBatch(theSender.Destination, new Envelope[]
            {
                Envelope.ForPing(),
                Envelope.ForPing(),
                Envelope.ForPing(),
                Envelope.ForPing(),
                Envelope.ForPing(),
                Envelope.ForPing()
            });

            theBatch.Messages.Each(x => x.Destination = theBatch.Destination);
        }