11-13-2012 06:31 PM
Hi All,
I got error 63 from TCP listen.vi and error 60 from retry.
Any idea of that?
Thanks a lot for any help.
Anne
11-13-2012 06:51 PM
You'll need to provide more context. Are you running one of the LabVIEW examples, or your own code? Can you share your code?
Did you look at the description for those error messages? Error 60 is Network Address Currently in Use. Most likely you're trying to listen on a port that some other service is already using, although maybe it's a firewall issue (I don't know what error you'd see, if any, if a firewall blocks your application from opening a listener). I'm a little surprised you'd see 63 (Network Connection Refused) from TCP Listen, but the error text says that too can happen due to a firewall too (although I'd think that would be on the client, not server, side). What port are you using? Have you tried a different port? Do you have a firewall enabled?
11-29-2012 12:36 PM
Hi thanks for your reply.
I attached my testing code.
Some time it works and no problem at all. Some time, error 63 with first try and then error 60 with following retries.
thanks a lot for any help.
Anne
11-29-2012 03:17 PM
The consequent error 60 is quite likely caused by the fact that Winsock does not close a socket immediately in order to handle lingering packets that might still be arriving for that socket. So your Listen tries to open a socket, but somehow gets refused that socket, but it has been allocated anyhow in the Winsock library and eventhough LabVIEW closes the socket (you do executed a TCP Close node even on error on the listen refnum do you?? ) Winsock needs some time to really deallocate that socket, and when you immediately retry the port is still in use.
Make sure to always close all refnums, also the listener refnum, even in error case and if that does not help add some delay before retrying to open the Listener again.
11-29-2012 04:12 PM
Thanks for your suggestions. I will give a try.
Thanks,
Anne