LEADTOOLS Support
General
General Questions
Dicom connection error - netaddressinuse
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, June 29, 2011 1:43:58 PM(UTC)
Groups: Registered
Posts: 4
Hi,
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 : 17.0.0.20
Leadtools.Dicom.Scu.dll : 17.0.0.6
Leadtools.Dicom.Scp.dll : 17.0.0.5
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.
Thanks
#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.
Thanks
#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)
Hello,
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.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
General Questions
Dicom connection error - netaddressinuse
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.