NAT type detection would be a good addition to the library; however,
it does not change how you do punchthru and it takes just as long as a
regular punchthru - so it might be easier just to try punchthru and
send unconnected "ping" packets to determine if you can get thru. It's
quite possible to implement nat type detection on the application side
using unconnected messages if needed.
The internal IP is used to try to connect directly; for example if two
computer behind the same nat router tries to connect eachother.
--michael
On 24 Aug, 19:02, Aidin Abedi <
aidinab...@gmail.com> wrote:
> I have another question. Why is the internal IPEndPoint of the client and
> server needed to send a NAT introduction? Are they really needed?
>
> Thanks!
>
>
>
> On Tue, Aug 24, 2010 at 6:56 PM, Aidin Abedi <
aidinab...@gmail.com> wrote:
> > I already check out the sample. I don't see any code that checks before
> > sending an NAT introduction whether it will be successful or not. The sample
> > doesn't seem to determine what NAT type the client or server is behind. This
> > feature is very important so that clients don't waist time trying to
> > NAT punchthru a router that is impossible to connect to. And also to let a
> > client or server know what their NAT type is so they can
> > take appropriate action.
>
> > Do you know how I can impl a algorithm that determines the
> > NAT capabilities of client or server before sending a punchthru?
>
> > Aidin
>