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 Sockets and Windows 10

UDP Sockets and Windows 10

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
14 Posts 5 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 Rick York

    I have a program that works just fine in all versions of 32 and 64-bit windows except for 10. I have tracked down the cause of the problem to UDP sockets. I have not been able to make them work with W10. TCP sockets work fine but UDP sockets are giving me fits. This same code works without issue on my old W7 box so I am now working on it just so I can make progress. Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

    A Offline
    A Offline
    Afzaal Ahmad Zeeshan
    wrote on last edited by
    #2

    Rick York wrote:

    This same code works without issue on my old W7 box so I am no working it just so I can make progress.

    Which same code? Secondly, Windows 10 supports UDP as well as TCP, the thing to note here would be, are you implementing UDP protocol properly? UDP is a very notorious protocol, as there are several handy things, that are missing in UDP — which TCP can brag about. I would personally believe, that you would need to double check the usage or implementation of UDP clients. Since you have not shared anything (code, working sample, UDP helpers etc.), it is hard to consider what might be doing wrong. :-) Before you start, understand that since most of the times UDP packets are used for malicious purposes, Windows may prevent them from entering, so please read the following resources before you starting doing anything, [UDP Communication is blocked by the Windows Firewall rule in WSFC](https://support.microsoft.com/en-in/help/2701206/udp-communication-is-blocked-by-the-windows-firewall-rule-in-wsfc-when) [c# - Problems with UDP in windows 10. UWP - Stack Overflow](https://stackoverflow.com/questions/36832880/problems-with-udp-in-windows-10-uwp) [windows 10 Version 1607 dropped udp packets with activated multicast](https://social.technet.microsoft.com/Forums/windowsserver/en-US/22237166-0d33-4ecd-a173-eaef41b1feae/windows-10-version-1607-dropped-udp-packets-with-activated-multicast?forum=win10itpronetworking)

    The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

    R L L 3 Replies Last reply
    0
    • A Afzaal Ahmad Zeeshan

      Rick York wrote:

      This same code works without issue on my old W7 box so I am no working it just so I can make progress.

      Which same code? Secondly, Windows 10 supports UDP as well as TCP, the thing to note here would be, are you implementing UDP protocol properly? UDP is a very notorious protocol, as there are several handy things, that are missing in UDP — which TCP can brag about. I would personally believe, that you would need to double check the usage or implementation of UDP clients. Since you have not shared anything (code, working sample, UDP helpers etc.), it is hard to consider what might be doing wrong. :-) Before you start, understand that since most of the times UDP packets are used for malicious purposes, Windows may prevent them from entering, so please read the following resources before you starting doing anything, [UDP Communication is blocked by the Windows Firewall rule in WSFC](https://support.microsoft.com/en-in/help/2701206/udp-communication-is-blocked-by-the-windows-firewall-rule-in-wsfc-when) [c# - Problems with UDP in windows 10. UWP - Stack Overflow](https://stackoverflow.com/questions/36832880/problems-with-udp-in-windows-10-uwp) [windows 10 Version 1607 dropped udp packets with activated multicast](https://social.technet.microsoft.com/Forums/windowsserver/en-US/22237166-0d33-4ecd-a173-eaef41b1feae/windows-10-version-1607-dropped-udp-packets-with-activated-multicast?forum=win10itpronetworking)

      The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

      R Offline
      R Offline
      Rick York
      wrote on last edited by
      #3

      Thank you for the links. They gave me a couple of hints to look into. Interesting coincidence : these apps communicate with cameras also but they aren't GigE and this is not a multicast problem, it's all unicast. I did not include code because the same code on both ends (camera and PC) works fine in XP and W7 and fails only on W10. Wireshark shows a well-formed packet being sent to the right destination but there is no response. It seems like it may be a firewall issue. That's where I am going to look next.

      1 Reply Last reply
      0
      • A Afzaal Ahmad Zeeshan

        Rick York wrote:

        This same code works without issue on my old W7 box so I am no working it just so I can make progress.

        Which same code? Secondly, Windows 10 supports UDP as well as TCP, the thing to note here would be, are you implementing UDP protocol properly? UDP is a very notorious protocol, as there are several handy things, that are missing in UDP — which TCP can brag about. I would personally believe, that you would need to double check the usage or implementation of UDP clients. Since you have not shared anything (code, working sample, UDP helpers etc.), it is hard to consider what might be doing wrong. :-) Before you start, understand that since most of the times UDP packets are used for malicious purposes, Windows may prevent them from entering, so please read the following resources before you starting doing anything, [UDP Communication is blocked by the Windows Firewall rule in WSFC](https://support.microsoft.com/en-in/help/2701206/udp-communication-is-blocked-by-the-windows-firewall-rule-in-wsfc-when) [c# - Problems with UDP in windows 10. UWP - Stack Overflow](https://stackoverflow.com/questions/36832880/problems-with-udp-in-windows-10-uwp) [windows 10 Version 1607 dropped udp packets with activated multicast](https://social.technet.microsoft.com/Forums/windowsserver/en-US/22237166-0d33-4ecd-a173-eaef41b1feae/windows-10-version-1607-dropped-udp-packets-with-activated-multicast?forum=win10itpronetworking)

        The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

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

        Afzaal Ahmad Zeeshan wrote:

        Before you start, understand that since most of the times UDP packets are used for malicious purposes, Windows may prevent them from entering, so please read the following resources before you starting doing anything,

        Good luck browsing the internet without UDP ... DNS utilizes UDP as well as many Microsoft system services. It is false that Microsoft blocks or has special rules for UDP. Best Wishes, -David Delaune

        1 Reply Last reply
        0
        • R Rick York

          I have a program that works just fine in all versions of 32 and 64-bit windows except for 10. I have tracked down the cause of the problem to UDP sockets. I have not been able to make them work with W10. TCP sockets work fine but UDP sockets are giving me fits. This same code works without issue on my old W7 box so I am now working on it just so I can make progress. Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

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

          Hi,

          Rick York wrote:

          Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

          The high level functionality in the network stack of Windows 10 is basically the same as the network stack in previous Windows releases. Your problem is most likely due to some firewall restriction policy. Btw, the obligatory "This is not a C++ question" applies here. Best Wishes, -David Delaune

          R 1 Reply Last reply
          0
          • A Afzaal Ahmad Zeeshan

            Rick York wrote:

            This same code works without issue on my old W7 box so I am no working it just so I can make progress.

            Which same code? Secondly, Windows 10 supports UDP as well as TCP, the thing to note here would be, are you implementing UDP protocol properly? UDP is a very notorious protocol, as there are several handy things, that are missing in UDP — which TCP can brag about. I would personally believe, that you would need to double check the usage or implementation of UDP clients. Since you have not shared anything (code, working sample, UDP helpers etc.), it is hard to consider what might be doing wrong. :-) Before you start, understand that since most of the times UDP packets are used for malicious purposes, Windows may prevent them from entering, so please read the following resources before you starting doing anything, [UDP Communication is blocked by the Windows Firewall rule in WSFC](https://support.microsoft.com/en-in/help/2701206/udp-communication-is-blocked-by-the-windows-firewall-rule-in-wsfc-when) [c# - Problems with UDP in windows 10. UWP - Stack Overflow](https://stackoverflow.com/questions/36832880/problems-with-udp-in-windows-10-uwp) [windows 10 Version 1607 dropped udp packets with activated multicast](https://social.technet.microsoft.com/Forums/windowsserver/en-US/22237166-0d33-4ecd-a173-eaef41b1feae/windows-10-version-1607-dropped-udp-packets-with-activated-multicast?forum=win10itpronetworking)

            The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~

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

            Live streaming would be severely limited without UDP you would have to buffer everything packet it up and deal with the TCP nak requests for resend from every user. There is no such thing as multicast on TCP it requires 1 to 1 handshaking. So do you really think your $50 webcam is going to be able to do that to thousands of users :-) Poor Skype and an industry we won't talk about :-)

            In vino veritas

            1 Reply Last reply
            0
            • R Rick York

              I have a program that works just fine in all versions of 32 and 64-bit windows except for 10. I have tracked down the cause of the problem to UDP sockets. I have not been able to make them work with W10. TCP sockets work fine but UDP sockets are giving me fits. This same code works without issue on my old W7 box so I am now working on it just so I can make progress. Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

              J Offline
              J Offline
              jeron1
              wrote on last edited by
              #7

              What types (if any) of error codes are you seeing?

              "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

              R 1 Reply Last reply
              0
              • J jeron1

                What types (if any) of error codes are you seeing?

                "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

                R Offline
                R Offline
                Rick York
                wrote on last edited by
                #8

                None at all. Just no response from the cameras. As I mentioned before, they will communicate with the exact same program if it runs on XP or W7. With W10 I can ping them, use FTP and Telnet with them, but UDP sockets will not work.

                J 1 Reply Last reply
                0
                • L Lost User

                  Hi,

                  Rick York wrote:

                  Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

                  The high level functionality in the network stack of Windows 10 is basically the same as the network stack in previous Windows releases. Your problem is most likely due to some firewall restriction policy. Btw, the obligatory "This is not a C++ question" applies here. Best Wishes, -David Delaune

                  R Offline
                  R Offline
                  Rick York
                  wrote on last edited by
                  #9

                  This is the obligatory "where should it go then?" question. The camera code is written in C. The PC app is C++ and MFC. I don't see a networking or Win10 category so where should it go?

                  L 1 Reply Last reply
                  0
                  • R Rick York

                    None at all. Just no response from the cameras. As I mentioned before, they will communicate with the exact same program if it runs on XP or W7. With W10 I can ping them, use FTP and Telnet with them, but UDP sockets will not work.

                    J Offline
                    J Offline
                    jeron1
                    wrote on last edited by
                    #10

                    Do you see the UDP data on WireShark and it's not being forwarded to your app? Sorry, I didn't see your previous reply.

                    "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

                    1 Reply Last reply
                    0
                    • R Rick York

                      I have a program that works just fine in all versions of 32 and 64-bit windows except for 10. I have tracked down the cause of the problem to UDP sockets. I have not been able to make them work with W10. TCP sockets work fine but UDP sockets are giving me fits. This same code works without issue on my old W7 box so I am now working on it just so I can make progress. Does anyone know of a fundamental issue with W10 and UDP sockets or is it just some setting somewhere they I need to correct?

                      R Offline
                      R Offline
                      Rick York
                      wrote on last edited by
                      #11

                      I have had no success getting the program to work on W10. I have done a lot of searching and this appears to be a fairly common problem but I haven't found a solution yet. I tried disabling the firewall service and several other things and they didn't help. The good news is can go back to working on W7. That's good news because I despise W10. :) This is also means our systems will be using W7 for the foreseeable future. Oh well.

                      L L 2 Replies Last reply
                      0
                      • R Rick York

                        This is the obligatory "where should it go then?" question. The camera code is written in C. The PC app is C++ and MFC. I don't see a networking or Win10 category so where should it go?

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

                        Rick York wrote:

                        This is the obligatory "where should it go then?" question.

                        I would suggest the System Admin forum[^] as this is exactly the type of thing they do all day. Some suggestions: 1.) Use wireshark to see if the packets are being sent. If you see the packets in wireshark... it means they are being physically sent down the wire. This also suggests that your problem is not the program... probably a router or hardware firewall issue. 2.) Bring the camera into your office and connect it directly to your workstation... without any switch or router in the middle. All Ethernet chipsets these days support auto-mdix and do not need a crossover cable. I'm showing my age here... Best Wishes, -David Delaune

                        1 Reply Last reply
                        0
                        • R Rick York

                          I have had no success getting the program to work on W10. I have done a lot of searching and this appears to be a fairly common problem but I haven't found a solution yet. I tried disabling the firewall service and several other things and they didn't help. The good news is can go back to working on W7. That's good news because I despise W10. :) This is also means our systems will be using W7 for the foreseeable future. Oh well.

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

                          Hi,

                          Rick York wrote:

                          I have had no success getting the program to work on W10.

                          You do realize that when you see packets in the Wireshark window it means they are being physically sent down the Ethernet cable right? Best Wishes, -David Delaune

                          1 Reply Last reply
                          0
                          • R Rick York

                            I have had no success getting the program to work on W10. I have done a lot of searching and this appears to be a fairly common problem but I haven't found a solution yet. I tried disabling the firewall service and several other things and they didn't help. The good news is can go back to working on W7. That's good news because I despise W10. :) This is also means our systems will be using W7 for the foreseeable future. Oh well.

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

                            It's easy to fix go to the network settings and disable IPv6. You are sending IPv6 UDP packets :-) Your device is not IPv6 capable and hence you see the packet on the wireshark but it doesn't respond. You need to update your code to only do an IPV4 connect.

                            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