How to Find Client Network cable is unplugged or plugged in [modified]
-
hi in my application i am sending message to a client using socket now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point regards sindhu tiwari
Always Innovative
modified on Saturday, January 05, 2008 3:12:21 AM
-
hi in my application i am sending message to a client using socket now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point regards sindhu tiwari
Always Innovative
modified on Saturday, January 05, 2008 3:12:21 AM
Hi! What kind of protocol are you using? Sockets can be used for all kinds of protocols, some of them containing ways to ensure that a message has been received, while others (like UDP, for example) don't give you this option.
Regards, mav -- Black holes are the places where God divided by 0...
-
Hi! What kind of protocol are you using? Sockets can be used for all kinds of protocols, some of them containing ways to ensure that a message has been received, while others (like UDP, for example) don't give you this option.
Regards, mav -- Black holes are the places where God divided by 0...
TCP/IP .......
its me sid
-
TCP/IP .......
its me sid
How about showing some code or being a little more verbose? It's almost impossible to help you if every single piece of information has to be wormed out of you...X| If you're using a
TcpClient
for example, the call toConnect
will throw an exception if the remote partner is not available, you can get aSocketException
when writing to aNetworkStream
with a disconnected remote partner, and so on. So what exactly are you doing and where do you need the information if the remote part is there?Regards, mav -- Black holes are the places where God divided by 0...
-
How about showing some code or being a little more verbose? It's almost impossible to help you if every single piece of information has to be wormed out of you...X| If you're using a
TcpClient
for example, the call toConnect
will throw an exception if the remote partner is not available, you can get aSocketException
when writing to aNetworkStream
with a disconnected remote partner, and so on. So what exactly are you doing and where do you need the information if the remote part is there?Regards, mav -- Black holes are the places where God divided by 0...
i am using this thing to send a ping to the client system..fine so suppose the network cable is unplugged still the server is sending the ping ...now when the system shut downs unexpectedlly due to power then the message is not send a exception is coming ..my doubt is why this expection is not raised when network cable is unplugged regards sindhu tiwari
its me sid
-
i am using this thing to send a ping to the client system..fine so suppose the network cable is unplugged still the server is sending the ping ...now when the system shut downs unexpectedlly due to power then the message is not send a exception is coming ..my doubt is why this expection is not raised when network cable is unplugged regards sindhu tiwari
its me sid
Once again - without any code it's impossible to tell where you're going wrong!
Regards, mav -- Black holes are the places where God divided by 0...
-
hi in my application i am sending message to a client using socket now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point regards sindhu tiwari
Always Innovative
modified on Saturday, January 05, 2008 3:12:21 AM
Take a look at the
System.Net.NetworkInformation
namespace. It contains a class calledNetworkChange
which contains two events:NetworkAddressChanged
tells you when an IP address has changed, andNetworkAvailabilityChanged
tells you when any network's availability changes. This, incidentally, is the same event Windows uses when it shows you the little notification balloon in the task tray when a cable is unplugged - they hook into the same operating system message. That namespace contains a number of other extremely interesting and useful classes, so spend some time exploring it. You can do pretty much anything you need to with networks using that namespace.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
-
Take a look at the
System.Net.NetworkInformation
namespace. It contains a class calledNetworkChange
which contains two events:NetworkAddressChanged
tells you when an IP address has changed, andNetworkAvailabilityChanged
tells you when any network's availability changes. This, incidentally, is the same event Windows uses when it shows you the little notification balloon in the task tray when a cable is unplugged - they hook into the same operating system message. That namespace contains a number of other extremely interesting and useful classes, so spend some time exploring it. You can do pretty much anything you need to with networks using that namespace.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
Thanks for ur reply... The main thing is that i want to know the network details about the client so if u have any idea how to implement this then please let me know
its me sid
-
Thanks for ur reply... The main thing is that i want to know the network details about the client so if u have any idea how to implement this then please let me know
its me sid
The
NetworkInformation
namespace contains a class that provides information about the connected networks, as well - IP address, network type, speed, etc.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein