示例#1
0
 public UdpListenerService(ILogger <UdpListenerService> logger, IOptions <UdpConfig> options)
 {
     this.logger    = logger;
     ListenerConfig = options.Value;
 }
 public UdpSpeakerService(ILogger <UdpSpeakerService> logger, IOptions <UdpConfig> options)
 {
     this.logger   = logger;
     SpeakerConfig = options.Value;
     logger.LogInformation($"Speaker: Speaking on {SpeakerConfig.SendPort}, Broadcasting on {SpeakerConfig.BroadcastPort}");
 }