Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 770 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 4 1 2 3 4
Re: How to start an internet server [Re: Michael_Schwarz] #131675
05/29/07 12:59
05/29/07 12:59
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
I've already tryed it with other PC's or online-users. With localhost/LAN-IP/Host-name it works fine, but not via internet.

Re: How to start an internet server [Re: TSG_Torsten] #131676
05/29/07 16:49
05/29/07 16:49
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
What about firewall? Do those 'other' users allow activity of your application? I can confirm what Michael_Schwarz said. I have had this problem too and spend hours thinking my program didn't worked. In the end it was just that I had to connect from localhost if i'm on the same connection as the server.

My friends could login from the internet after i'd portforwarded to the server on my LAN. There were some problems with ports (bug) and firewall issues that prevent the application from working correctly at first.


smile
Re: How to start an internet server [Re: D3D] #131677
05/29/07 18:13
05/29/07 18:13
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
I've had the same problem in the past. If you have a linksys router call them up (like I did) and keep calling until u finally get lucky and get the one or two people that actually know something.. believe me... that's the only way.. stupid linksys routers suck


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: How to start an internet server [Re: PrenceOfDarkness] #131678
05/30/07 17:24
05/30/07 17:24
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
I don't have a linksys router, and if I host other game servers I can connect via internet-ip to my own server.
Anyway, all my firewalls are deactivated.
But are you sure that I don't need to open ports? Because no one say's something about it.

If I connect from another LAN-PC to the internet-ip, is this a 'backloop', too?

Last edited by TSGames; 05/30/07 20:32.
Re: How to start an internet server [Re: TSG_Torsten] #131679
05/31/07 00:03
05/31/07 00:03
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
You should activate some ports, dont remember them now though - have a look for them in the manual.

And yes, conecting from a LAN PC via the internet-ip is a backloop too.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: How to start an internet server [Re: Michael_Schwarz] #131680
05/31/07 15:11
05/31/07 15:11
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
See which ports are open with 'netstat -a' from command prompt. Or another gui based application that does the same. If you look above you'll notice giorgi3's reply on what the default ports are. You can change this sure.


smile
Re: How to start an internet server [Re: D3D] #131681
06/01/07 11:14
06/01/07 11:14
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
I have opened many ports and forwaded it. I have opened the port which i have given starting the server as -port and have opened it and forwarded. I've also tryed to use DMZ.

Re: How to start an internet server [Re: TSG_Torsten] #131682
06/02/07 20:48
06/02/07 20:48
Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
TSG_Torsten Offline OP

User
TSG_Torsten  Offline OP

User

Joined: Mar 2005
Posts: 564
/www/europe/ germany/index.php
Does no one have an idea?

Re: How to start an internet server [Re: TSG_Torsten] #131683
06/02/07 22:55
06/02/07 22:55
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
From what I gather from your responses and others, there are two options:

You have a LAN address (192.168-ish for example) and a WAN address (222.222-ish for example) on the same computer. In other words you are multi-homed. In this case you CANNOT set the IP... it will automatically default to the LAN number. Maybe if you have a public class-c address lower than 192.xxx.xxx.xxx, 3DGS might pick it up but I'm not sure. To solve disable the LAN connection, start 3DGS server, then re-enable the LAN connection.


IF on the other hand you have a router in between your server and the world, then the server will always default to the private addy (192), the clients will always connect to the public addy (222 or whatever) and your router is going to have to do the translation between public and private (NAT, port forward, DMZ).

Re: How to start an internet server [Re: fastlane69] #131684
06/03/07 14:28
06/03/07 14:28
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
The Server running MyGame.exe
ISP: 212.110.33.219 <- adsl ip address assigned by isp
YOU: 192.168.1.56 (or 127.0.0.1 = localhost)
Port: 2332

Observer Mode: -sv -cl -ip 192.168.1.56 -port 2332 -pl TheObserver
Server Mode: sv -ip 192.168.1.56 -port 2332

Client1 running MyGame.exe

ISP: 213.107.15.33
HIS: 192.168.1.82
Connect over LAN: -cl -ip 192.168.1.56 -pl Client1
Connect over WWW: -cl -ip 212.110.33.219 -pl Client1


Client2 running MyGame.exe
ISP: 213.104.22.16
HER: 192.168.1.44
Connect over LAN: -cl -ip 192.168.1.56 -pl Client2
Connect over WWW: -cl -ip 212.110.33.219 -pl Client2


To view local ip assigned by server:
1: Goto Start|Execute
2: Type cmd and press ENTER
3: Type ipconfig and press ENTER

To view the server connection ip assigned by ISP:
http://whatismyip.com

-PORT

Through this command line option, a port address for TCP/IP client/server communication can be given. Valid ports are in the range 2300..2400. If no port is given, a default port address is assigned. A port address can only be given for the server - the client will connect to the right port automatically.

Guess the client will try any port from 2300-2400 when connecting to the server behind a router!? In my quick test I portforwarded ports ranging from 2300 to 2400 on the router to a computer on my LAN as shown above for example. Also allowed access in the firewall on the server.

No need to run the server with -ip 212.110.33.219 instead of -ip 192.168.1.56 right? This is only needed for the clients who connect from over the internet. On my router -> server if I try to run from ISP assigned ip, it loops back. The multiplayer functions are dropped without error until you restart the server.

Also I tried to get the server ip displayed. Only to find out that just like you it only broadcast the LAN assigned ip. To solve, try to find the free GSHTTP plugin here. This plugin can be used to get the real server ip assigned by your ISP inside your application.

To end. I have tried the GSHTTP plugin and it will not work without some changes. So thanks to Excessus and Michael_Schwarz here's what you need.

Download GSHTTP v1.3 (5.5+ compiled with source) or with Crypt if you like!?
Put 'GSHTTP.dll' in the folder where your project is.
Put 'gshttp.wdl' in the folder where your project is.
Open 'gshttp.wdl' in SED and replace all code with:

Code:
// GSHTTP v1.3
// All return 1 if error else returns 0 unless otherwise stated.
// id in every function is the number of the HTTP client. Start at zero.

dllfunction HTTP_Create(id); // Create HTTP Client

dllfunction HTTP_Get(id,url_str); // HTTP GET the URL in url_str
dllfunction HTTP_Post(id,url_str,data_str); // HTTP POST the URL in url_str and pass data_str as the post data
dllfunction HTTP_PostFile(id,url_str,file_str,var_str);
// HTTP POST the URL in url_str and upload the file file_str via multipart mime
// File_str is Directory of the Acknex EXE + file_str
// Content type for the upload is set to application/x-compress

dllfunction HTTP_PostFile2(id,url_str,file_str);
// HTTP POST the URL in url_str and upload the file file_str as the post data
// File_str is Directory of the Acknex EXE + file_str

dllfunction HTTP_Abort(id); // Tells the client to abort working.

dllfunction HTTP_IsWorking(id); // Check to see if HTTP_Get() or HTTP_Post() are currently working

dllfunction HTTP_Results(id,results_str); // Fill results_str with the results from HTTP_Get() or HTTP_Post().
//If there was an HTTP error, fills results_str with error number.
dllfunction HTTP_SaveToFile(id,filename_str);
// Save the results from HTTP_Get() or HTTP_Post() to a file named from the string filename_str.
// If there was an HTTP error, the file will contain an error number.
// The path of the acknex exe is added to the beginning of filename_str.
// To save into the main dir of your application filename_str would equal "blah.mdl".
// To save into a sub dir of your main application dir your filename_str would equal "\\blah\\blah.mdl".
// Back slashs in AckNex strings need to be double slashed or they are ignored.

dllfunction HTTP_Free(id); // Free HTTP Client
// Free HTTP clients from the end of the list first (100, 99, 98...).
// Freeing HTTP clients in the middle will move clients after it up in the list.
// If you have 10 clients and you free #5, #6 will become #5 and so on. There will be 9 clients in the list.

string IP_Adress;

function GET_IP_ADR
{
if(HTTP_Create(0) == 0)
{
HTTP_Get(0, "http://www.yourdomain.com/ip.php");
while(HTTP_IsWorking(0))
{
wait(1);
}
HTTP_Results(0, IP_Adress);
HTTP_Free(0);
}
}
on_p=Get_IP_ADR;

/*
var ResultString;
ACTION GetWebPage {

dll_handle = dll_open("GSHTTP.dll");

if (HTTP_Create(0)==0) {


HTTP_Get(0,"http://www.google.com");

while(HTTP_IsWorking(0)==1) {
waitt(16);
}

ResultString=" ";
HTTP_Results(0,ResultString);

msg_show(ResultString,10);

HTTP_Free(0);

}

dll_close(dll_handle);

}


var PostString;
var ResultString;
ACTION PostWebPage {

dll_handle = dll_open("GSHTTP.dll");

if (HTTP_Create(0)==0) {


PostString="a=b";

HTTP_Post(0,"http://www.yahoo.com/",PostString);

while(HTTP_IsWorking(0)==1) {
waitt(16);
}

ResultString=" ";
HTTP_Results(0,ResultString);

msg_show(ResultString,10);

HTTP_Free(0);

}

dll_close(dll_handle);

}
*/



Open your your main.wdl file and include 'gshttp.wdl' in my sample all other wdl files are inside 'code' directory, your setup might be different.

Code:
PLUGINDIR = "."; // open Dlls in the "plugins" subfolder

path ".\\code"; // code

include "gshttp.wdl";

font justarial = "arial" , 1 , 14; // 1 = bold
var video_mode = 7; // 800x600
var video_depth = 32; // 32bit color
var video_screen = 2; // 1=full 2=window
var fps_max = 60;

text TheServerIP // display the server ip
{
layer = 5;
strings=1;
string=IP_Adress;
pos_x=75;
pos_y=375;
red = 192;
green = 192;
blue = 192;
font=justarial;
flags = visible;
}



To run press P on keyboard.

Oh, but wait we need some kind of php script first to get the real server ip address. Put this code inside a text file and save as ip.php, then upload the file in ASCII mode to any host that support PHP.

Code:
<?php

// This will display the server IP

$TheServerIP = $_SERVER['REMOTE_ADDR'];
print $TheServerIP;

?>



Open 'gshttp.wdl' and edit to reflect your own domain:
HTTP_Get(0, "http://www.yourdomain.com/ip.php");

Run your application and press P. Now it displays your real server ip address.

All IP addresses in this post are fake and used for example only. Sorry if one of them belongs to someone.


smile
Page 2 of 4 1 2 3 4

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1