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. UDP Server vs Client

UDP Server vs Client

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiosysadmin
5 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.
  • B Offline
    B Offline
    bkelly13
    wrote on last edited by
    #1

    Please direct me to an article that discusses the difference between a UDP Server application and the Client application. So far I surmise that the server starts with no knowledge of where a client might be. It can either begin broadcasting data (this is my current need) or listen for a client to connect. On the other hand, the client must know the address of the server and it either begins listening for broadcasts from the server or it sends a message to the server to accomplish something, such as to solicit some information from the server.

    Thank you for your time

    L L 2 Replies Last reply
    0
    • B bkelly13

      Please direct me to an article that discusses the difference between a UDP Server application and the Client application. So far I surmise that the server starts with no knowledge of where a client might be. It can either begin broadcasting data (this is my current need) or listen for a client to connect. On the other hand, the client must know the address of the server and it either begins listening for broadcasts from the server or it sends a message to the server to accomplish something, such as to solicit some information from the server.

      Thank you for your time

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Google for "sockets udp" and you will find plenty. Be aware that if you use UDP then you need to implement your own protocol for checking that all messages get processed, and in the correct order.

      B 1 Reply Last reply
      0
      • L Lost User

        Google for "sockets udp" and you will find plenty. Be aware that if you use UDP then you need to implement your own protocol for checking that all messages get processed, and in the correct order.

        B Offline
        B Offline
        bkelly13
        wrote on last edited by
        #3

        I have done that. Here is the first page of results from my good search for “udp sockets” Before providing the list, I do suspect that if I already knew the differences I may well find that information in these sites. As I do not, that information can be rather difficult to pick out. https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html goes right to code, does not discuss the difference http://www.cs.dartmouth.edu/~campbell/cs60/socketprogramming.html does not discuss why there is client and server with UDP https://en.wikipedia.org/wiki/Network\_socket does not discuss https://www.w3.org/TR/tcp-udp-sockets/ Section 9 begins UDP, jumps right into code with no explanation Just for the record, this is the most thorough discussion I have found http://www.binarytides.com/programming-udp-sockets-c-linux/ does not discuss the differences https://www.abc.se/~m6695/udp.html does not discuss https://developer.chrome.com/apps/sockets\_udp does not discuss https://cs.nyu.edu/~bacon/phd-thesis/diss/node32.html does not discuss the differences https://wiki.python.org/moin/UdpCommunication “server” is in the article in only one place discussing a Windows bug http://www.microhowto.info/howto/listen\_for\_and\_receive\_udp\_datagrams\_in\_c.html Starts off with: Suppose that you wish to write a server that implements the … But does not address the differences. References RFC 867 which does not discuss the differences Do I need to continue? I am looking for a discussion on the differences between server and client in UDP operations. Not in the code difference but in the difference in concept between the two. Looks to me like two servers or two clients can well carry on a conversation via UDP packets.

        Thank you for your time

        L 1 Reply Last reply
        0
        • B bkelly13

          I have done that. Here is the first page of results from my good search for “udp sockets” Before providing the list, I do suspect that if I already knew the differences I may well find that information in these sites. As I do not, that information can be rather difficult to pick out. https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html goes right to code, does not discuss the difference http://www.cs.dartmouth.edu/~campbell/cs60/socketprogramming.html does not discuss why there is client and server with UDP https://en.wikipedia.org/wiki/Network\_socket does not discuss https://www.w3.org/TR/tcp-udp-sockets/ Section 9 begins UDP, jumps right into code with no explanation Just for the record, this is the most thorough discussion I have found http://www.binarytides.com/programming-udp-sockets-c-linux/ does not discuss the differences https://www.abc.se/~m6695/udp.html does not discuss https://developer.chrome.com/apps/sockets\_udp does not discuss https://cs.nyu.edu/~bacon/phd-thesis/diss/node32.html does not discuss the differences https://wiki.python.org/moin/UdpCommunication “server” is in the article in only one place discussing a Windows bug http://www.microhowto.info/howto/listen\_for\_and\_receive\_udp\_datagrams\_in\_c.html Starts off with: Suppose that you wish to write a server that implements the … But does not address the differences. References RFC 867 which does not discuss the differences Do I need to continue? I am looking for a discussion on the differences between server and client in UDP operations. Not in the code difference but in the difference in concept between the two. Looks to me like two servers or two clients can well carry on a conversation via UDP packets.

          Thank you for your time

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          There is no big difference, apart from the fact that the server is (usually) passive and the clients active. I'm not really sure what your real issue is, since this is not anything specific to UDP.

          1 Reply Last reply
          0
          • B bkelly13

            Please direct me to an article that discusses the difference between a UDP Server application and the Client application. So far I surmise that the server starts with no knowledge of where a client might be. It can either begin broadcasting data (this is my current need) or listen for a client to connect. On the other hand, the client must know the address of the server and it either begins listening for broadcasts from the server or it sends a message to the server to accomplish something, such as to solicit some information from the server.

            Thank you for your time

            L Offline
            L Offline
            leon de boer
            wrote on last edited by
            #5

            There is no requirement for handshaking on UDP so who is server and who is client is purely notional. In human perspectives it's like two people talking on a CB band and one claiming they are the server and the other the client. The answer is purely in the eyes of the beholder and it is completely meaningless to the operation. It is the EXACTLY the same situation you have two parties chatting using UDP and no-one is in control. Either party can choose a) not to send or b) not to listen and so the idea of who is server and who is client is pointless. Generally the thing that makes that decision is where the data is coming from and going to which has nothing to do with the protocol. However for any situation you gave me I could always argue the server is the other end to the one you choose (you just have to pick the right criteria). To give you an example consider SNMP packets sent from a router back to be logged to a central site (your ISP usually has a display log of your data usage using this). Is the SNMP server the central site or is it the router sending the SNMP packets? Well if you goto the router settings they will generally call themselves the SNMP server. Most likely your SNMP monitor software will also call itself a server because it has the database and is running on an actual server. So which is server and which is client .. well non-one cares it changes nothing :-)

            In vino veritas

            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