K
ksukat63
Guest
I am developing using Visual Studio Professional 2015.
I have created a windows service with 2 threads. It connects to a serial port and talks to several pieces of equipment connected to a 485 network. Thread 1 polls the equipment continuously. Thread 2 sets up a tcpListener on a specific port. When it "hears" a command on that port, it sets an interrupt flag that thread 1 looks at. Thread 1 then stops its polling. Thread 2 then sends commands over the serial port and receives data back and writes it to the tcpport.
Problem:
Periodically, when it receives the diagnostic commands (command on tcpport) it hangs and desktop application gets socket time outs.
Any ideas how I can start to attack debugging this as it is a desktop exe that sends the command to the tcp port and a service exe that listens and responds ?
thanks
Continue reading...
I have created a windows service with 2 threads. It connects to a serial port and talks to several pieces of equipment connected to a 485 network. Thread 1 polls the equipment continuously. Thread 2 sets up a tcpListener on a specific port. When it "hears" a command on that port, it sets an interrupt flag that thread 1 looks at. Thread 1 then stops its polling. Thread 2 then sends commands over the serial port and receives data back and writes it to the tcpport.
Problem:
Periodically, when it receives the diagnostic commands (command on tcpport) it hangs and desktop application gets socket time outs.
Any ideas how I can start to attack debugging this as it is a desktop exe that sends the command to the tcp port and a service exe that listens and responds ?
thanks
Continue reading...