Jump to content
  • Advertisement
Sign in to follow this  
bilsa

Forwarding a connection?

This topic is 4857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys! If I have something like this: LoginServer.exe GameServer.exe Client.exe Is there any way to do this: 1. Client.exe connects to LoginServer.exe with ip:192.192.192.192 port:9999 2. Client.exe requests to login 3. LoginServer.exe checks that the login was successful and sends the result back to Client.exe Now comes the part I'm not sure is possible to do: (at least I don't know how) 4. I want LoginServer.exe, which already has accepted a tcpip connection with the Client.exe, to "forward" the connection to GameServer.exe. I know I could just send the packets to the GameServer.exe, but that would make both LoginServer.exe AND GameServer.exe get the same packets :( So I would want to "forward" the connection to GameServer.exe so that the Client.exe speaks directly to GameServer.exe instead of LoginServer.exe And the tricky part is that I have no means to change the Client.exe, so I can't just disconnect from LoginServer.exe and connect with GameServer.exe. So the Client.exe must basically "think" that it's speaking to LoginServer.exe I can only change the LoginServer.exe and GameServer.exe Is this possible to achieve? Thx !

Share this post


Link to post
Share on other sites
Advertisement
There is no way to "forward" a connection. You either need to create a separate connection from LoginServer to GameServer to forward the packets, or you need to tell the client to re-connect to GameServer (and disconnect it from LoginServer).

If you want to make sure that the client has been authenticated by LoginServer, you can take a look at my authentication article.

Share this post


Link to post
Share on other sites
Thx guys!

Actually I would disconnect/reconnect, if I could... but this is for a game server emulator I'm doing, so I don't have that option :)

I can't actually recompile the client... and the official server-client is designed
so stupidly that the login-server and game-server is on the same ip and port -
thus it must be a single application.

Anyway, this is a sollution I came to think of:

1. Make a Client.exe that each player needs to start up the game with
2. The actual game.exe connects to the Client.exe, which is on the users
computer. The game.exe only speaks to the Client.exe.
3. The Client.exe can then freely connect/disconnect to/from any server
of it's choice.

This makes it possible to have separate applications for Login server and
game server and ai server etc :)

Anyway, thank you!

[Edited by - bilsa on December 3, 2005 11:29:02 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!