コード例 #1
0
 public RelayServerFactory(
     RelayServerConfiguration configuration,
     IDedicatedServerPortAllocator dedicatedServerPortAllocator)
 {
     _configuration = configuration;
     _dedicatedServerPortAllocator = dedicatedServerPortAllocator;
 }
コード例 #2
0
        public RelayServer(
            IDedicatedServerPortAllocator dedicatedServerPortAllocator,
            IPEndPoint endPoint,
            IPEndPoint sourceEndPoint,
            IPEndPoint targetEndPoint,
            int inactivityTimeout = 60)
            : base(endPoint)
        {
            _dedicatedServerPortAllocator = dedicatedServerPortAllocator;
            _logger = Log.ForContext <RelayServer>();

            _sourceEndPoint    = sourceEndPoint;
            _targetEndPoint    = targetEndPoint;
            _inactivityTimeout = inactivityTimeout;
        }