- hostAddress
- The IP address of the host computer (the SCP's address).
- hostPort
- The port number of the host computer (the SCP's port).
- maxNumberOfPeers
- The maximum number of SCUs that may be connected to the SCP.
- ipType
- The type of ip address supported (IPv4, IPv6, or both)
Visual Basic (Declaration) | |
---|---|
Overloads Public Sub Listen( _ ByVal hostAddress As String, _ ByVal hostPort As Integer, _ ByVal maxNumberOfPeers As Integer, _ ByVal ipType As DicomNetIpTypeFlags _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As DicomNet Dim hostAddress As String Dim hostPort As Integer Dim maxNumberOfPeers As Integer Dim ipType As DicomNetIpTypeFlags instance.Listen(hostAddress, hostPort, maxNumberOfPeers, ipType) |
C# | |
---|---|
public void Listen( string hostAddress, int hostPort, int maxNumberOfPeers, DicomNetIpTypeFlags ipType ) |
C++/CLI | |
---|---|
public: void Listen( String^ hostAddress, int hostPort, int maxNumberOfPeers, DicomNetIpTypeFlags ipType ) |
Parameters
- hostAddress
- The IP address of the host computer (the SCP's address).
- hostPort
- The port number of the host computer (the SCP's port).
- maxNumberOfPeers
- The maximum number of SCUs that may be connected to the SCP.
- ipType
- The type of ip address supported (IPv4, IPv6, or both)
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 hostAddress is "*", the IP address will be all of the local computer's addresses. This is useful if the local computer has more than one network interface and address.
If hostPort is 0, the port number will be the number of the first available port.
To connect to a server as a client, you must first create and initialize a DicomNet object. Then call Connect(String,Int32,String,Int32) to establish the connection.
To use your computer as an SCP, you must first create a DicomNet object. Then call Leadtools.Dicom.DicomNet.Listen to listen for incoming connection requests.
This overload of the DicomNet.Connect method allows you to specify the type of Internet Protocol Version to use. Pass DicomNetIpTypeFlags.Ipv4 for ipType to support the Internet Protocol version 4 (IPv4), which is the standard "dotted quad" 32-bit address format that has been in use since 1981. An example of an IPv4 address is 192.168.0.195
Pass DicomNetIpTypeFlags.Ipv6 for ipType to support Internet Protocol Version Version 6 (IPv6). IPv6 uses a 128-bit address format. An example of an IPv6 address is fe80::18bd:81f:6b02:759f
To support both IPv4 and Ipv6 addresses, pass DicomNetIpTypeFlags.Ipv4OrIpv6 for ipType.
If the call to Connect(String,Int32,String,Int32) fails, make sure that the IP address that you passed for hostAddress is a valid address that is accessible within your network. You can verify the accessibility of both IPv4 and IPv6 addresses using the windows ping command. For example, to verify that 192.168.0.195 is accessible within your network, do the following
- Start command prompt, and type the following command
- ping 192.168.0.195
Note that the following are equivalent:
- Listen( hostAddress, hostPort, maxNumberOfPeers);
- Listen( hostAddress, hostPort, maxNumberOfPeers, DicomNetIpTypeFlags.Ipv4);
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)