Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am facing a strange issue on my Ubuntu (12.04.3 64 bit). I have a couple of C programs communicating (let's call them sender and receiver programs) through sockets. These work as expected when the machine (a dell laptop in this case) is connected to LAN.

But when I isolate the laptop from the LAN (which means the Wired Connection is disconnected as shown in Network Manager), I can no longer send/receive using sockets. Probably the communication goes through the network card which is not powered (my guess) in this case. Please suggest how to resolve it.

Thanks in advance.

share|improve this question

1 Answer 1

up vote -1 down vote accepted

You should use loopback address "localhost" or "127.0.0.1" in that situation!

share|improve this answer
    
Probably I didn't make it clear in my question, but I am using "multicast communication" using sockets. So I donot need an IP address to send to. –  Bhanu Challa Feb 6 at 6:21
    
Okay, Thats a whole another issue in itself. I don't know much about that but you might look into similar questions about it. A simple google search brings up this stackoverflow.com/questions/6180749/…. It basicly tells to use this setsockopt(socket, IPPROTO_IP, IP_MULTICAST_LOOP, 0, 1); –  cpz Feb 6 at 6:46
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. –  Ask Feb 6 at 7:26

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.