Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a setup of a SCPI server in a Win7 PC and have 2 other programs talking to it locally( over TCPIP socket 5025 and 5029.

This worked well and stable in a fresh PC, but when we moved it into our production lines and the IT dept added their policies and stuff, it became unstable. The PC is connected to the production floor server but both of the programs are running locally in the PC.

The connection tends to be disconnected when there is an idle period. And it takes 5-6times to refreshing the connection to get it back.

I'm not a programmer myself, so I'm hoping to see if anyone here can help with some answers.

Thank you very much!!

Regards, KwanWee.

share|improve this question

migrated from Jun 30 '12 at 2:16

This question came from our site for professional and enthusiast programmers.

Are the connections coming from the other side of a NAT firewall? – sarnold Jun 29 '12 at 2:20

1 Answer 1

For the timeout issue, you'll probably need to either get IT's help in removing whatever policy is causing the connection to be closed, or work around it by ensuring that the link does not go idle for long enough to timeout. For example, you could periodically execute a command that shouldn't have any effect such as *IDN? or polling some error register (I forget if those clear on read; if they do you will have to use the value in your program)

In terms of the re-connection problem, does your server process continue operating, and using the same listen socket to accept the re-connections? If not - if you are binding a new socket (or restarting the program) - your problem could be a failure to set SO_REUSADDR on the socket.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.