public UdpServiceTests() { var clientFacade = CourierBuilder.Create() .UseUdpTransport( UdpTransportConfigurationBuilder.Create() .WithUnicastReceivePort(21338) .Build()) .BuildAsync().Result; var serverFacade = CourierBuilder.Create() .UseUdpTransport( UdpTransportConfigurationBuilder.Create() .WithUnicastReceivePort(21339) .Build()) .BuildAsync().Result; Setup(clientFacade, serverFacade); }
public UdpMessagingTests() { var senderFacade = CourierBuilder.Create() .UseUdpTransport( UdpTransportConfigurationBuilder.Create() .WithUnicastReceivePort(21338) .Build()) .UseTcpServerTransport(21337) .BuildAsync().Result; var receiverFacade = CourierBuilder.Create() .UseUdpTransport( UdpTransportConfigurationBuilder.Create() .WithUnicastReceivePort(21339) .Build()) .UseTcpServerTransport(21338) .BuildAsync().Result; Setup(senderFacade, receiverFacade); }
private static async Task <ICacheFacade <K, V> > CreateCohortAsync <K, V>(int cohortNumber, CacheConfiguration <K, V> cacheConfiguration) { // Force loads assemblies in directory and registers to global serializer. new RyuFactory().Create(); AssertTrue(cohortNumber >= 0 && cohortNumber < 15); var cohortId = Guid.Parse("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".Replace('x', (cohortNumber + 1).ToString("x")[0])); var courier = await CourierBuilder.Create() .ForceIdentity(cohortId) .UseUdpTransport( UdpTransportConfigurationBuilder.Create() .WithUnicastReceivePort(21338 + cohortNumber) .Build()) .UseTcpServerTransport(21337 + cohortNumber) .BuildAsync().ConfigureAwait(false); var cacheInitializer = new CacheInitializer(courier); var myCacheFacade = cacheInitializer.CreateLocal <K, V>(cacheConfiguration); return(myCacheFacade); }