asyncsocket - asyncudpsocket does not send UDP as expected

I have XCODE 3.1.4 running ona mini MAC 10.5.8 and Simulator 3.1I want to send a short UDP string for some remote control and have made the following codeBasicly it does compile and run in the simulator ... but it nevers send any UDP to the target. I hope someone can give me a clue why it does not workMy .H code#import <UIKit/UIKit.h>#import "AsyncUdpSocket.h"#import "AsyncSocket.h"@interface ChangeLabelViewController : UIViewController {IBOutlet UILabel *label ;AsyncUdpSocket *socket;}-(IBAction) ChangeLabel;-(IBAction) ResetLabel;@endMy...Read more

udp - How to enable QUIC along with http/2

Recently I am in touch with this word QUIC along with http/2 which is gaining much attention in web world. Able to get many notes about QUIC but not able to find how to enable/configure/install it so that the connection goes through it. I don't know what is relevant word to use to make it work. But please help to see it in action.I am able to upgrade to http/2 where as configuring QUIC is becoming difficult....Read more

Why isn't netcat udp message being recieved by netcat listener?

I have netcat listening for udp traffic on port 8125 in terminal 1nc -ul 8125and in terminal 2 I run the following (a test dogstatsd message for troubleshooting a datadog client connection):echo "test_metric:1|c" | nc -u -w 1 -v localhost 8125#found 0 associations#found 1 connections:# 1: flags=82<CONNECTED,PREFERRED># outif lo0# src ::1 port 50397# dst ::1 port 8125# rank info not available#Connection to localhost port 8125 [udp/*] succeeded!I would expect to see test_metric:1|c show up in the output of terminal 1, but there i...Read more

udp hole punch and port restricted cone NAT

I would like to understand how udp hole punching works when two hosts each behind the port restricted cone NAT establish connection.As I understood, it happens in several stages and involves three hosts.Host A and host B are behind the port restricted cone NAT.Host C is a server that can receive packets from the hosts A and B.A sends a packet to C.C receives packet from A and determines A's external address:port pairB sends a packet to C.C receives packet from B and determines B's external address:port pairC sends the external address:port of B...Read more

UDP hole punching not going through on 3G

I'm trying to implement in a software a hole punching feature.The thing is, I'm implementing this with an already made TCP Server to communicate with Users.Here's what I have so far : "A" sends a message to an UDP Server "US" (on port 9333)"US" sends back to "A" the port it has connected to (port 31000 - localport 31005)"A" sends a message to a TCP Server "TS" saying he want's to connect to B (and give the port 31000)"TS" sends a message to "B" giving him the "A"'s port (31000) and ip"B" sends a message to "US" (on port 9333)"US" sends a messag...Read more

udp - How many mappings does a Restricted Cone NAT remember?

Say I'm behind a Restricted Cone NAT and I want to be able to receive a UDP message from some endpoint EP-A (of some PC on the internet not behind a NAT). I first send a UDP packet to that EP-A to punch a hole in the NAT.This means that the NAT needs to remember the mapping:(My local endpoint, EP-A)But what happens when I send another UDP packet to another remote endpoint EP-B? Will the new mapping (My local endpoint, EP-B) overwrite the old one? Or will the NAT remember both?If the NAT is capable of remembering more than one such mapping, then...Read more

udp - Get Public IP and port

While working a little bit with WebRTC i've learned what the beast is NAT and STUN and i was on my way to test my understanding how it all is working.Here is the link where u can get your remote address and port along with your local one.For example:my local ip:port is192.168.1.2:4500my internet provider will translate it to209.200.1.2:14500and will store the translation table like|||and it effectively means when connection comes to it is forwarded to that i have a cor...Read more

Source UDP port after router

I have a 2 networks, connected via a NAT/router.PC(A, in network A (with router, sends a UDP paket to a pc (B, in the other network B (with router network A the packet has source ip/port and dst,in network B its becomes src ip/port (because 6000 is free for whatever reason, just for the example sake) and dst PC A sends another udp packet from source ip/port to another PC in network B.The source port in network A is th...Read more

udp - Hole punching using STUN

I'm currently trying to send UDP messages over the internet and have to set up the firewalls for both endpoints A and B (which are both behind a NAT). To do this, I want to use hole punching using a STUN server.When A creates a request to the STUN server (say, private: and public: I get as a response. If I were to send a packet from the same origin configuration (same origin ip and port that were used for the STUN-request) to any other destination address (the destination port stays the same) ...Read more

udp - For how long a router keeps records in the NAT and can they be reused forwarding requests from other hosts?

There is an answer explaining in simple terms how a router works translating requests from the local network to outside and back ( what is not clear - for how long a record in the NAT is kept?For example, if I send a UDP request to and my local endpoint is the router rewrites the request packet and adds a record to the NAT. Let's say the external endpoint will be Then the computer which received my request r...Read more

udp - If app A listens to the same private port previously used by app B, will app A get app B's public port number?

If one application listens to the same private port number previously used by another application on that computer, will the more recent app get the same public port number as the less recent app?Application A and Application B both use non-multicast UDP. They both run on a computer that is behind a residential router that does not have port forwarding set up. If application A listens to the same private port number (behind NAT) that application B just finished listening to, will application A receive the same public port number that applicatio...Read more

Should an IPv6 UDP socket that is set up to receive multicast packets also be able to receive unicast packets?

I've got a little client program that listens on an IPv6 multicast group (e.g. ff12::blah:blah%en0) for multicast packets that are sent out by a server. It works well.The server would also like to sometimes send a unicast packet to my client (since if the packet is only relevant to one client there is no point in bothering all the other members of the multicast group with it). So my server just does a sendto() to my client's IP address and the port that the client's IPv6 multicast socket is listening on.If my client is running under MacOS/X, ...Read more

Network UDP broadcast design?

I am working on a C++ server/.NET client applications couple in which my server (which runs the c++ on linux) broadcasts a message to show it's alive to the whole network and my .NET program listens for packets and parses to get the uptime of the server.As I have read, to send a regular UDP broadcast to the broadcast address, I simply have to send a packet to (in my case or Is this right? Can I use the same port address? Are there any other necessities? I understand the fact that if my .NET program ...Read more