Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, June 29, 2011 1:43:58 PM(UTC)


Groups: Registered
Posts: 4


I am trying to connect to dicom server for querying data. It connects and query dicom server perfectly on my first attempt. But when I repeat the same more than once without closing the form, it fails and throws exception "NetAddressInUse".

Attached is a sample test project for your reference.

Leadtool version : 17
Leadtools.Dicom.dll :
Leadtools.Dicom.Scu.dll :
Leadtools.Dicom.Scp.dll :

Could you please send me sample code or direct me to a sample project which could help me to connect multiple times to a server and query data without the above mentioned error.

Any help would be greatly appreciated.


Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, June 30, 2011 3:34:44 AM(UTC)


Groups: Registered
Posts: 4

It is not letting me edit my post..?

Anyway here is attached sample code.

Could you please help me with the same.

File Attachment(s):
SampleDicomTest.txt (9kb) downloaded 36 time(s).
#3 Posted : Friday, July 1, 2011 6:40:49 AM(UTC)


Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)


I've created a small sample project from the code that you sent, and I have a few comments to share regarding this.
1.) You commented out the server.Listen call in your code, so I had to add that back in in order to use your code
2.) You're passing a host port on the client side, but you should use the value 0. The only reason I know of for specifying a port here is if the client wants to direct the server to send the response back on a specific port. For instance if you're in a high-security instiution and only one port will be available to you to use, then you'll have to pigeon hole the application to use it.
3.) When messages are received over TCP/IP, they are buffered. There is a timeout that TCP/IP has as well before that port can be used again. This is not a LEADTOOLS issue, but how the protocol itself works.
4.) If you're just playing with the LEADTOOLS server and client support, a small demo like this is fine. However, the setup does not make a lot of sense (from a real-world prospective). There'd be no reason for the same application to host information for itself and use network communication. In short, any testing like this would be best to separate the client and server into separate applications, or at least separate forms.
5.) If you haven't done so already, I would suggest checking out our low-level server and client demos. These are good illustrations of how you can create these type of applications. We provide the source code for you to see how it has been done also.
File Attachment(s):
DicomTest.zip (28kb) downloaded 43 time(s).
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.069 seconds.