Leadtools.Dicom Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
Connect Method
See Also 
Leadtools.Dicom Namespace > DicomNet Class : Connect Method




hostAddress
The IP address of the host computer (the SCU's address).
hostPort
The port number of the host computer (the SCU's port).
peerAddress
The IP address of the peer computer to which to connect (the SCP's address).
peerPort
The port number of the peer computer to which to connect (the SCP's port).
Connects an SCU to an SCP.

Syntax

Visual Basic (Declaration) 
Public Sub Connect( _
   ByVal hostAddress As String, _
   ByVal hostPort As Integer, _
   ByVal peerAddress As String, _
   ByVal peerPort As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As DicomNet
Dim hostAddress As String
Dim hostPort As Integer
Dim peerAddress As String
Dim peerPort As Integer
 
instance.Connect(hostAddress, hostPort, peerAddress, peerPort)
C# 
public void Connect( 
   string hostAddress,
   int hostPort,
   string peerAddress,
   int peerPort
)
Managed Extensions for C++ 
public: void Connect( 
   string* hostAddress,
   int hostPort,
   string* peerAddress,
   int peerPort
) 
C++/CLI 
public:
void Connect( 
   String^ hostAddress,
   int hostPort,
   String^ peerAddress,
   int peerPort
) 

Parameters

hostAddress
The IP address of the host computer (the SCU's address).
hostPort
The port number of the host computer (the SCU's port).
peerAddress
The IP address of the peer computer to which to connect (the SCP's address).
peerPort
The port number of the peer computer to which to connect (the SCP's port).

Example

For an example, refer to SendAssociateRequest.

Remarks

If hostAddress is an empty string or a null reference (Nothing in Visual Basic), the IP address will be the local computer's address.

If hostPort is 0, the port number will be the number of the first available port.

To connect to an SCP as an SCU, you must first create a DicomNet object. Then call Connect to establish the connection.

To use your computer as an SCP, you must first create a DicomNet object. Then call Listen to listen for incoming connection requests.

When an SCU calls this method, it generates a call to OnAccept on the SCP.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Dicom requires a Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features