Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / DarkNet won't work right over the internet

Author
Message
Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Sep 2013 13:38
Hi, I have created a server app, this server is on an IP that is directly accessible on the internet. There might be a NAT at my ISP. I can access my server with my client program with no problems at all. The server is hosted at my home, it is on the same internet connection as my home computer but they are at two different IP's and my computer running the client is behind a router and the server is not behind a router. I use DarkNet for all my network commands. Strange thing is that everyone else connecting to my server get all sorts of errors. It can be things like the server is trying to read a packet and reaches the end of the packet before all data was read or there might be troubles with adding strings to packets. I am guessing there might be some NAT problems I am not handling proper. I tried using mn start nat 1 but that produces an error :-( Can somebody shed some light on this?

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 20th Sep 2013 13:53
Might be worth asking the creator of the plugin here.

I have no idea what is causing your problem.

Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Sep 2013 14:07
Are you behind a router? Set up your port properly? Perhaps post some code so we can see the problem.

Always be sure (when working with TCP packets) that all packets that are send, must be received, in order!

Regards Sph!nx
www.mental-image.net
Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Sep 2013 14:31
Quote: "Might be worth asking the creator of the plugin here."

I will try that after some further testing

Quote: "Are you behind a router? Set up your port properly?"

It works fine for me behind my own router and I have not set up any ports. I just made some changes an now I was able to log in a friend and play a game. So far so good. Now I am waiting for my other friend to come online so I can test with him as he had troubles playing yesterday.

Quote: "Always be sure (when working with TCP packets) that all packets that are send, must be received, in order!"

I always start my packets with a byte (mn add byte sendpacket,"byte"), this byte tells what this packet contains. When the server or client recieves a packet they read this first byte. For instance 1 is login, 2 is login response. Shouldn't this handle my packets properly even if they arrive out of order?

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 20th Sep 2013 15:36
Cool, I just feel this is one those questions for Michael; or someone experienced with networking.

Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Sep 2013 16:36
Well, not implying I'm a network master, but I have recently implemented full udp/tcp networking code (server - client) with multiple client instances for server list scanning etc.... so, I might be able to help if I see some code.

Regards Sph!nx
www.mental-image.net
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Sep 2013 17:14
I believe the NAT commands are deprecated now, or I could be confused with a similar function, so read the latest documentation, are you using DarkNet 2 or previous?

Cybermind
Valued Member
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 21st Sep 2013 15:00
It seems to be working now The problem seems to have been bad code on my behalf :-P

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...

Login to post a reply

Server time is: 2026-07-07 19:10:40
Your offset time is: 2026-07-07 19:10:40