Author Topic: Trouble getting connected  (Read 1905 times)

dylan92

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Trouble getting connected
« on: September 12, 2016, 10:19:08 PM »
I've been using TNet for a couple years now and things have been going great, until recently.  Recently I've been having trouble establishing connections between 2 computers.  Now I know there's a million things that could prevent users from getting connected, but I'm hoping you have some suggestions on how to alleviate this issue.

Some background about my setup:
  • I'm using TNet 2 (willing to upgrade to TNet 3 if you think it would help)
  • TNet's UPnP support returns successfully and I can see the ports open in the UPnP section of my router
  • I also added Mono.NAT to my project to open ports via UPnP in cases where TNet's fails

Now when players try to connect they often get the connection refused error message.  I've done some research into alternatives when UPnP isn't successful, and the two solutions I've found are NAT punch-through and using Relay Servers.  I'd prefer to avoid paying for relay server hosting (which is one of the main reasons I purchased TNet in the first place), so the option I'm looking at now is NAT punch-through.  Is NAT punch-through something you are considering adding to TNet, or do you know of any other libraries that would help with adding NAT punch-through to a TNet project?  Or do you have another solution to get players connected more reliably?

Any advice is greatly appreciated!
- Dylan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Trouble getting connected
« Reply #1 on: September 13, 2016, 11:25:25 AM »
NAT punch-through is an obsolete piece of software that sort-of works for UDP traffic, and is very hard to get done for TCP traffic that TNet relies on (and is even less likely to work than UPnP). NAT punch-through in general is a hack to get IPv4 inbound connections to work.

TNet 3 supports IPv6 which doesn't need any kind of punch-through.