I done the WinSock and the server can now accept game\login connections
here is a code snippet from the whole things
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace SmartSource
{
class Program
{
static void Main(string[] args)
{
try
{
ushort AuthPort = 9959;
ushort GamePort = 5816;
AsyncSocket AuthServer = new AsyncSocket(AuthPort);
AuthServer.OnClientConnect += AuthServer_NewConnection;
AuthServer.OnClientReceive += AuthServer_Receive;
AuthServer.OnClientDisconnect += AuthServer_Disconnection;
AsyncSocket GameServer = new AsyncSocket(GamePort);
GameServer.OnClientConnect += GameServer_NewConnection;
GameServer.OnClientReceive += GameServer_Receive;
GameServer.OnClientDisconnect += GameServer_Disconnection;
Console.WriteLine("***************** Welcome to AlbetrosAdvancedSource ********************");
Console.WriteLine("******************** I Hope as many as bugs to be fixed **********************");
Console.WriteLine("________________________________________________________________________________");
//Console.WriteLine(" ");
Console.WriteLine("Auth.Listener Initialized...");
Console.WriteLine("Client.Listener Initialized...");
Console.WriteLine(" ");
}
catch (Exception e)
{
Console.WriteLine("Unknown Error : "+ e);
}
Console.ReadLine();
}
//Start Of AuthServer
#region AuthServer
static void AuthServer_NewConnection(Authentication.IsWrapper obj)
{
}
static void AuthServer_Receive(byte[] arg1, Authentication.IsWrapper arg2)
{
}
static void AuthServer_Disconnection(Authentication.IsWrapper obj)
{
}
#endregion
//End of AuthServer
//Start Of GameServer
#region GameServer
static void GameServer_NewConnection(Authentication.IsWrapper obj)
{
}
public static void GameServer_Receive(byte[] arg1, Authentication.IsWrapper arg2)
{
}
static void GameServer_Disconnection(Authentication.IsWrapper obj)
{
}
#endregion
//End Of GameServer
}
}
I think the first step will deal with
Code:
static void AuthServer_NewConnection(Authentication.IsWrapper obj)
{
}
And this is an image from the client that seems to be connected to the server
This is the console application code till now but what confuses me is that i know that i must begin with the login sequence but dont where to start
#Hint : i want to use the same database that albetros use
[NOTE] : This project will be an albetros' source bug fixing no build credits will be for me except for the new login system that i hope i finish it without bugs
AND I KNOW THIS IS THE EASIEST PART OF THE WHOLE PROCCESS AND DONT WORRY I DONT REQUEST HELP UNTILL I TRY MYSELF MANY TIMES BUT SOMETIMES THINGS GET COMPLICATED SO EXCUSE ME