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. MFC Networking Application.

MFC Networking Application.

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmintutorialc++question
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.
  • R Offline
    R Offline
    reddy07
    wrote on last edited by
    #1

    Scenario: The application has 10 nodes connected in a network. each node can either act as server/client. At any given time there will be only one server and one client. My question is say for example if default server is down - then client application will poll the message to remaining nodes looking for server if not it will become server for remaining clients. So, how to poll message in a network using MFC.

    N F 2 Replies Last reply
    0
    • R reddy07

      Scenario: The application has 10 nodes connected in a network. each node can either act as server/client. At any given time there will be only one server and one client. My question is say for example if default server is down - then client application will poll the message to remaining nodes looking for server if not it will become server for remaining clients. So, how to poll message in a network using MFC.

      N Offline
      N Offline
      norish
      wrote on last edited by
      #2

      You can use UDP broadcasting technique in that situation. Server should implements workerthread which calls UDP recvfrom and client calls UDP sendto when its default server is down. Notice; UDP broadcasting would not pass through the routers to different network, so machine nodes should be in the same network usually.

      1 Reply Last reply
      0
      • R reddy07

        Scenario: The application has 10 nodes connected in a network. each node can either act as server/client. At any given time there will be only one server and one client. My question is say for example if default server is down - then client application will poll the message to remaining nodes looking for server if not it will become server for remaining clients. So, how to poll message in a network using MFC.

        F Offline
        F Offline
        fanronghua
        wrote on last edited by
        #3

        Very Well.

        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