Socket programming for a game server
<p>There is a game called WYD, and I began programming an emulator for it, 
because we have the original emulator, but is in version 6.13 and the actual version is 7.58.</p>

<p>This space between versions much has changed, and update it through a DLL is very disadvantageous, 
for various reasons, the main thing is the changing structure of almost all packets.</p>

<p>The original emulator of this MMO, have a DataBase Server, which connects the GameServer, 
and clients connect to GameServer, forming a structure like this: DB &lt;- GS &lt;- Client.</p>

<p>Have many projects emulators for this game on the net, but all use mysql as DB. 
But i would like to follow line of the original emulator, where have a database server, 
that accepts the connection of up to 5 GameServers, and these accept up to 750 clients!</p>

<p>The original works something like this!</p>

<p>The client sends the login request to the GS, this in turn interprets the received packet, 
and sends to the database, where it checks if the account exists, it is connected, and so on. 
And it sends the response to GS which in turn sends for the client!</p>

<p>What I wonder is how I could do the programming sockets of the GS, since it has to be a client 
of the DB and server of the Clients!</p>

<p>if someone can give me an example of how to do this would be a great help!</p>
