Closed ByronAP closed 4 years ago
Hey,
Its only slightly changed, to this:
var repository = new PacketHandlerRepository();
repository.AddPacketHandler(IPAddress.Any, packetHandler, "secret");
_authenticationServer = new RadiusServer(
udpClientFactory,
new IPEndPoint(IPAddress.Any, 1812),
radiusPacketParser,
RadiusServerType.Authentication,
repository,
NullLogger<RadiusServer>.Instance);
So instead you create the PacketHandlerRepository and pass that to the server. It is more verbose, but rationale behind this change was that in some cases you may want to do more complex logic for deciding which package handler to use
I don't think I fully understand. Are you saying that it is marked obsolete to help people know not to directly use the interface but instead use the implementation of PacketHandlerRepository?
closing just because it is not a real issue, although some code comments would be helpful :-)
https://github.com/vforteli/Flexinets.Radius.RadiusServer/blob/7b8ed15923a85b87ba2c1e0b47d66a8541f1b64b/RadiusServer/IPacketHandlerRepository.cs#L11-L16
What is the recommended way to add handlers if this way is obsolete?