Re: IP Multicast Receiver - how to do it in Right Way???
- From: "Phil Frisbie, Jr." <phil@xxxxxxxxxxxx>
- Date: Thu, 03 Nov 2005 09:13:33 -0800
Mr.Cyber wrote:
Hi, brothers! :)
I have some tool - multichannel proxy (Win32, WinXP SP2, Winsock2). Each channel has polymorphic end point, that is any channel can be configured to work with, for example TCP/IP to Multicast IP, file to TCP/IP, Multicast IP to Multicast IP and so on. I get data from one end point and transfer it to another. Everything works Well! But I've spotted one Problem. I can create channel Multicast IP to ... anyThing. And it woks fine! But all other channels, that will be liesten to any other Multicast IP - they won't work :(((( My channel do not share any resoureces, they have not any common point and places. I'm sure in this.
Hence I do something wrong when I try to listen to Multicast IP.
On the internet there are not so many articles and examples regarding this question. And all they fall into two group:
You must first bind() the socket to the port that the multicast address uses, just like when using broadcast.
>1. with using setsockopt(m_sock, IPPROTO_IP, IP_ADD_MEMBERSHIP ......... ) 2. with using WSAJoinLeaf(.....)
And till now I can't relly understand ... - do these function the same?
Not exactly, since WSAJoinLeaf() acts like a combination of of accept() and connect(). I have always used socket() and setsockopt() for multicast and it works fine and it is portable.
- which of them should be used and when exactly - and finally - how should look stable working Multicast IP listener.
I'll really appreciate your assistance, explanations or useful links. THANKS in Advance!!!
-- Phil Frisbie, Jr. Hawk Software http://www.hawksoft.com .
- Prev by Date: Re: Open Name Pipes
- Next by Date: Re: Open Name Pipes
- Previous by thread: LSP examples to modify received data
- Next by thread: Simulating a send() with no data
- Index(es):
Relevant Pages
|