Network Server Help

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Guezt

Network Server Help

Post by Guezt »

Hi all,

I have these NETWORK problem:

i create a small test of SERVER and CLIENT apps
i test it on my own pc running the SERVER and CLIENT
at the same pc and it works fine.

But when i run CLIENT under different pc, it took
a long time trying to connecting from my server,
actually it not connecting.

Im using win XP as my test server, also from
my client apps.


My Inquiry is:

Is there anything else need for configuration
under windows network properties or something
else. for me to connect my client apps to the my
server.

any idea may help. tnx in advance

sorry for my bad english
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

Looool .
I did'n know that irrlicht is having network too ... and i'm programing the network with an low level library ....

... anyway ... what are you using for network code?
Pr3t3nd3r_guest

Post by Pr3t3nd3r_guest »

if we still are offtopic tday i have a question too.
Doe's any one made a code ... with any network library except direct network what is able to conect to a lan game with out knowing the server ip ?
Plz ... (i need an way to find servers ... any servers :D any library ... just to get the server ip ...)
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Pr3t3nd3r_guest wrote:if we still are offtopic tday i have a question too.
Doe's any one made a code ... with any network library except direct network what is able to conect to a lan game with out knowing the server ip ?
Plz ... (i need an way to find servers ... any servers :D any library ... just to get the server ip ...)
telnet
Image
Akano

Post by Akano »

To the first Post:

Give more Information, that we can help you ;) Have you SP2 or a firewall? Check it.

To the Find server Post:

You can broadcast on local networks to find servers. Try Google or look on RakNet.

Greetz
Guest

Post by Guest »

Pr3t3nd3r_guest wrote:if we still are offtopic tday i have a question too.
Doe's any one made a code ... with any network library except direct network what is able to conect to a lan game with out knowing the server ip ?
Plz ... (i need an way to find servers ... any servers :D any library ... just to get the server ip ...)
Yes. With Raknet ping the broadcast address and with the server set the offline ping response to something that says the game stats / rules / players etc.
trg
Posts: 10
Joined: Tue Sep 20, 2005 7:33 pm

Post by trg »

In the case you connect on your own pc, the hostname usually localhost, or the IP is loopback ip add 127.0.0.1, or your IP on your local network such as 192.168.0.1.
If you connect to another PC, you have to know its IP add on your local LAN network, or WAN IP add on the Internet or its hostname. If you're on behide the firewall for example you're using an Ethernet ADSL modem/router, your have to config your router to open the port you want to listen on server.
Guezt

Post by Guezt »

Thanks pipz for the reply.

Im trying to use raknet under irrlicht a small chat apps for my irrlicht project.


My SERVER apps prompts are:

-SERVER-----------------------
Enter SERVER NAME : TESTSERVER
Enter SERVER IP : 208.0.0.1
Enter SERVER PORT : 6000
------------------------------
Start Server : Y
------------------------------
Message :>




My CLIENT apps prompts are:

-CLIENT-----------------------
Enter Player NAME : TESTPlayer
Enter Player IP : 207.00.00.1
Enter Player PORT : 7000
------------------------------
Enter SERVER IP : 208.0.0.1
Enter SERVER PORT : 6000
------------------------------
Connect now : Y
------------------------------
Chat :>



BTW: I get the IP address by typing ipconfig under dos prompt


If i run my SERVER and CLIENT on one
pc it works fine, of course the server-ip
and client-ip will use the same, i just need
to change the port of the client without
having any problem and i can chat, lol
from my desktop with server and client.


But if i run the client from another pc
it just strying to connect. lol, forever...
and not connecting at all.

I think the problem is with the port
setting, but i really dont have any idea
what is really the port number of my modem
or how to get it.

thanks again. still not connecting, huhuhu.
Fred

Post by Fred »

Post your RakNet problems to the RakNet forums - you have a better chance of getting help.
trg
Posts: 10
Joined: Tue Sep 20, 2005 7:33 pm

Post by trg »

From both two computers ping other computer IP to make sure they connect OK.
On Windows XP SP2 your have to open default firewall ports for example 7000, 8000. Or when firewall app popup message alert, you choose "don't block" to automatically open all ports from these apps. Note that RakNet uses UDP protocol, not TCP.
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

Guezt
Your code above won't work on more than one computer. Both IP addys you posted are loopback IPs. You need to find out your real ip address. Google is your friend here.
After adding your real IP address, anyone anywhere will be able to connect to you.
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Guezt

Post by Guezt »

Hiyaaaaaa, hehe, it work nows, finally

:| I Just disabled the Firewall option
from my dial up configuration on winXP.

Thanks from all of u!!!!

BTW: Raknet is fast even on 56kbps connection
but i only test it on 5 user plus my server.


Thanks alot guys.
Post Reply