   Forwarding a connection?
  Hey guys!If I have something like this:LoginServer.exeGameServer.exeClient.exeIs there any way to do this:1. Client.exe connects to LoginServer.exe with ip:192.192.192.192 port:99992. Client.exe requests to login3. LoginServer.exe checks that the login was successful and sends the result   back to Client.exeNow 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.exeAnd the tricky part is that I have no means to change the Client.exe, so I can'tjust disconnect from LoginServer.exe and connect with GameServer.exe.So the Client.exe must basically "think" that it's speaking to LoginServer.exeI can only change the LoginServer.exe and GameServer.exeIs this possible to achieve?Thx !   
  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.   ;  You could always make the login server a proxy for the game server but that's just a really bad idea. Just make another connection.   ;  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 designedso 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 with2. 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 andgame server and ai server etc :)Anyway, thank you![Edited by - bilsa on December 3, 2005 11:29:02 AM]