Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Multicast in c++

Multicast in c++

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    styve
    wrote on last edited by
    #1

    Hi everyone! Is there anyone that has implement a multicast program on c++, that join a multicast group. When it had join a group it will logg traffic and saves it in a circular buffer. But first I will have some help with joining a multicast group. Please help me, Stefan

    G I 2 Replies Last reply
    0
    • S styve

      Hi everyone! Is there anyone that has implement a multicast program on c++, that join a multicast group. When it had join a group it will logg traffic and saves it in a circular buffer. But first I will have some help with joining a multicast group. Please help me, Stefan

      G Offline
      G Offline
      Giles
      wrote on last edited by
      #2

      You need to make sure that your router supports multicast.


      "Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table. Shameless Plug - Distributed Database Transactions in .NET using COM+

      1 Reply Last reply
      0
      • S styve

        Hi everyone! Is there anyone that has implement a multicast program on c++, that join a multicast group. When it had join a group it will logg traffic and saves it in a circular buffer. But first I will have some help with joining a multicast group. Please help me, Stefan

        I Offline
        I Offline
        Igor Proskuriakov
        wrote on last edited by
        #3

        Code to Join: struct ip_mreq mreq; // mreq is the ip_mreqstructure { struct in_addr imr_multiaddr; //The multicast group to join struct in_addr imr_interface; //The interface to join on } #define RECV_IP_ADDR "225.6.7.8" // An arbitrary multicast address mreq.imr_multiaddr.s_addr = inet_addr(RECV_IP_ADDR); mreq.imr_interface.s_addr = INADDR_ANY; err = setsockopt( sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&mreq, sizeof(mreq)); Igor Proskuriakov

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups