←Select platform

DefaultSocketOptions Property

Summary
Gets the default DICOM socket options.
Syntax
C#
Objective-C
C++/CLI
public DicomSocketOptions DefaultSocketOptions { get; } 
@property (nonatomic, strong, readonly) LTDicomSocketOptions *defaultSocketOptions; 
public: 
property DicomSocketOptions DefaultSocketOptions { 
   DicomSocketOptions get(); 
} 

Property Value

The default DICOM socket options.

Remarks

This property contains the default socket options that will be used when calling DicomNet.Connect(). The default socket options are the initial values contained in SocketOptions.

Example
C#
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"; 
} 
Requirements

Target Platforms

Help Version 23.0.2024.8.20
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Dicom Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.