// Setup the server DicomServer server = new DicomServer(); // Handle incoming DICOM association requests server.AssociationRequest += (sender, e) => { Console.WriteLine($"Incoming DICOM association request from {e.Association.CallingAET}"); }; int port = 104; server.Listen(port); // Example - Called later i.e. when receiving too many association requests. server.AbortAssociations();