Establishes a connection to listen for incoming connection requests.
public void Listen(
string hostAddress,
int hostPort,
int maxNumberOfPeers
)
Public Overloads Sub Listen( _
ByVal hostAddress As String, _
ByVal hostPort As Integer, _
ByVal maxNumberOfPeers As Integer _
)
public:
void Listen(
String^ hostAddress,
int hostPort,
int maxNumberOfPeers
)
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
Backlog parameter.
If hostAddress is an empty string or a null reference (Nothing in VB), 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.
The maxNumberOfPeers parameter is the value passed to the WinSock listen() function for the backlog parameter that limits the size of the queue for waiting connections. As an example, suppose that the value is set to 3 and that 4 people try to connect at exactly the same time. In such a case, all 4 will be rejected because the connection backlog queue is full. But if one of the connections has been accepted by the time the 4th is made, then all will work.
To determine how many clients are connected and impose a limit on the number of connections, perform the following steps:
To connect to a server as a client, you must first create and initialize 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.
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