R
Ryan
Hello all,
This is my first post so I thanks in advance. I'm writing a windows
service application that connects to four different servers (to
elaborate they are machinery equipment) to retrieve information via
tcp. I wrote a "controller" class that manages the connection and
communcation for each individual machine. My reads are asynchronous
because my application needs to be able to "handshake" with the machine
when getting the data. Sends are synchronous. I was working with
TcpClient object and got it working however I need to be able to detect
when I'm not connected to the machine so I switch to using the lower
level Socket class.
My dilemma is this. If the object is not connected to a machine for
any reason (i.e. machine is off for service or off hours), I want to be
able to keep trying to re-connect to the machine. But I don't want the
"re-connect" to block communication with the other machines. Any ideas?
This is my first post so I thanks in advance. I'm writing a windows
service application that connects to four different servers (to
elaborate they are machinery equipment) to retrieve information via
tcp. I wrote a "controller" class that manages the connection and
communcation for each individual machine. My reads are asynchronous
because my application needs to be able to "handshake" with the machine
when getting the data. Sends are synchronous. I was working with
TcpClient object and got it working however I need to be able to detect
when I'm not connected to the machine so I switch to using the lower
level Socket class.
My dilemma is this. If the object is not connected to a machine for
any reason (i.e. machine is off for service or off hours), I want to be
able to keep trying to re-connect to the machine. But I don't want the
"re-connect" to block communication with the other machines. Any ideas?