Available in LEADTOOLS Medical Imaging toolkits. |
L_DicomAccept
#include "ltdic.h"
L_LTDIC_API L_INT L_DicomAccept(hNet, hPeer)
HDICOMNET hNet; |
/* a DICOM Network handle */ |
HDICOMNET hPeer; |
/* a DICOM Network handle */ |
Accepts a connection request from a client.
Parameter |
Description |
hNet |
A DICOM Network handle that references the host (the server). |
hPeer |
A DICOM Network handle that references the client that requested the connection. |
Returns
0 |
SUCCESS |
>0 |
An error occurred. Refer to Return Codes. |
Comments
When a client requests a connection by calling L_DicomConnect, a call to the ACCEPTCALLBACK function is generated on the server. Within the ACCEPTCALLBACK function the server can decide whether to accept the connection or not. If the connection is accepted, L_DicomAccept is called. This generates a call to the CONNECTCALLBACK function on the client, letting the client know the connection has been made.
You should always accept a connection request. Once the connection is made you can check the SCU and close the connection if you do not wish to maintain it. Since the connection requests are queued, if you do not accept a connection, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling L_DicomAccept at this point will connect the first request, not the second, since the first request is still in the queue.
Required DLLs and Libraries
LTDIC For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Win32, x64
See Also
Functions: |
L_DicomConnect, L_DicomListen, CONNECTCALLBACK, ACCEPTCALLBACK |
Topics: |
Example
For an example, refer to L_DicomListen.