Check out the Timeouts for Sockets and TcpClient stuff
TheSocket.SetSocketOption(SocketOptionLevel.Socket ,
SocketOptionName.SendTimeout, 10000)
TheSocket.SetSocketOption(SocketOptionLevel.Socket ,
SocketOptionName.ReceiveTimeout, 10000)
System.Net.Sockets.TcpClient.ReceiveTimout = 10000
System.Net.Sockets.TcpClient.SendTimeout = 10000
good luck!
Shawn Shelton
Eric Cathell wrote:
I have an application that I am using to send documents to printers over a
network. If the printer is powered off, or in configuration mode, or the
client bridge is down, the tcpclient just hangs....I need a way to make it
time out and continue to the loop....any know a way i can do that? say if it
doesnt connect in 10 seconds to timeout and continue the loop?
Eric