multicastsocket

Java: Determine receiving address when receiving with MulticastSocket

Hi, I am using MulticastSocket to receive UDP Multicast packets. How can I determine to which address such a packet was sent? With the methods provided, I am only able to determine the sender address. Of course, I am the one who sets the To-Address when creating the listening socket, but can I really be sure about this? What about broa...

MulticastSocket not responding after failure

I get a SocketException when trying to call joinGroup(addr) on MulticastSocket. This is only happening on a Windows machine that we have setup to auto start our appliction when the machine is booted up. It seems like the exception is thrown because Windows has not completely finished its startup process and here is the exception. java...

Objective-C - Determining IP address of iPod touch programmatically

I'm programming in objective-C for several iPod devices and I was wondering about something. I'm developing an application that utilizes the server-client model and I'm using the UDP protocol with C sockets. Is there a class out there that allows me to determine the iPod devices IP address? After googling around other forums, I haven't f...

Extracting IP address from C sockets

Ok, I'm still new to using C sockets, but I was wondering if there is a way to extract the IP address adding running setsockopt? If you'll look at my code below, I have everything in my multicast sockets ready to send except for defining the variable mc_addr which is my IP address. Am I doing anything wrong that's real noticeable? If so,...

Help with Sending/ Receiving UDP packets - C Sockets

Ok, if you look at some of my previous questions, I've been working on getting a simple connection up and running with C sockets (I'm still fairly new to the whole networking aspect of an program, but everyone has to start somewhere, right?). I've included the code below that I have so far and when I execute it, I get no errors, but at t...

I am trying simple multicast transmission and recetpion and whenever i use specific ip address with bind towards receiver side it does not work but if i use IN_ADDR_ANY it works.

Hello friends, I am trying simple multicast transmission and recetpion and whenever i use specific ip address with bind towards receiver side it does not work but if i use IN_ADDR_ANY it works. I checked with the help of wireshark that the packet is sent on the network with appropriate data. Below is my receiver code : int main(int ...

Is Java MulticastSocket threadsafe?

I have two threads. First one sends datagrams with a MulticastSocket in loop; the second thread receives datagrams using the same instance of MulticastSocket in loop. It seems to be working properly, but I'm still in doubts. Can these two threads use the same instance of MulticastSocket? Is MulticastSocket threadsafe in respect send/re...

SSDP Get Shared folder list using M-SEARCH?

hi , I am using SSDP to send discover request using M-SEARCH to get list of services present. My requirement is like i want to get list of share folders also which are present in that server. Currently , i am sending this request in this format : "M-SEARCH * HTTP/1.1\r\n" "Host: 239.255.255.250:1900\r\n" "Man: \"ssdp:discover...

receive multicast from specific network interface on Linux

Hello, I'm trying to receive a multicast data from specific network interface on CentOS 5.5 sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(1234); addr.sin_addr.s_addr = htonl(INADDR_ANY); bind(sd, (sockaddr*)&addr, sizeof(sockaddr_in)); setsockopt(sd...

Android Multicast socket stops listening

I have a service on Android that listens and responds to packets it receives via multicast. This works most of the time, but unfortunately, I'm finding that every now and again it'll just stop receiving packets. The thread remains blocked on the call to MulticastSocket.receive(), but nothing comes out. I've been slowly trying to track d...