public DicomSocketOptions SocketOptions { get; set; }
@property (nonatomic, strong) LTDicomSocketOptions *socketOptions;
public:
property DicomSocketOptions SocketOptions {
DicomSocketOptions get();
void set ( DicomSocketOptions value);
}
The DICOM socket options to use when calling DicomNet.Connect().
This property contains the socket options that will be used when calling DicomNet.Connect(). Internally, the socket is created when calling DicomNet.Connect(). Therefore, if you do not want to use the default socket options, you must set the SocketOptions before calling DicomNet.Connect().
This example will change the socket options before calling DicomNet.Connect
using Leadtools;
using Leadtools.Dicom;
void DisplaySocketOptions(DicomSocketOptions options)
{
string sMsg = string.Format("Socket Options:\n\tnSendBufferSize: {0}\n\tnReceiveBufferSize: {1}\n\tbNoDelay: {2}",
options.SendBufferSize,
options.ReceiveBufferSize,
options.NoDelay);
Console.WriteLine($"Socket Options: {sMsg}");
}
public void SocketOptionsSample()
{
DicomEngine.Startup();
DicomNet.Startup();
using (DicomNet net = new DicomNet(Path.Combine(LEAD_VARS.ImagesDir, "temp"), DicomNetSecurityMode.None))
{
DicomSocketOptions options = net.DefaultSocketOptions;
// Display the default socket options
DisplaySocketOptions(options);
// Set the socket options before calling Connect
options.SendBufferSize = options.SendBufferSize * 2;
net.SocketOptions = options;
// Display the new socket options
DisplaySocketOptions(net.SocketOptions);
//connect to a server using the new socket options
net.Connect(null, 1000, "127.0.0.1", 104);
// ...
// ...
// ...
net.Close();
}
DicomEngine.Shutdown();
DicomNet.Shutdown();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document