I'm sure you will cover this in the tutorials, but I'd just like to clarify a few things.
I'd send the username and password from the client to the server using a byte. The very first byte would be a OperationByte which the server will read and then use the
protected override void OnOperationRequest(OperationRequest operationRequest, SendParameters sendParameters)
{
Log.DebugFormat("Recieved operation request from client {0}", operationRequest.OperationCode);
operationRequest.Parameters.Remove((byte)ParameterCode.UserId);
operationRequest.Parameters.Add((byte)ParameterCode.UserId, UserId);
switch (operationRequest.OperationCode)
{
case (byte)TheWorldPeerCode.Login:
_server.SubServers.LoginServer.SendOperationRequest(operationRequest, sendParameters);
break;
case (byte)TheWorldPeerCode.Chat:
_server.SubServers.ChatServer.SendOperationRequest(operationRequest, sendParameters);
break;
}
}
to send if to lets say the Login server using the _server.SubServers.LoginServer? Am I correct on this thinking? The code may be a little off but I'm pretty sure that's how it works.
Next question where exactly is it sending the operation request and sendParameters after that?
dragagon
Thu, 11/24/2011 - 10:25
Permalink
So I need a refresher on
So I need a refresher on where I left off with my videos, but this is the idea. The master server comes up first, each sub server - login, chat, and region - connects to the master server and passes it what type it is. That is what gets referenced when we call _server.SubServers.LoginServer.SendOperationRequest. The appropriate OutgoingMasterServerPeer for that server will read the message and deal with it accordingly.
crzyone9584
Fri, 12/02/2011 - 11:11
Permalink
So in your tutorials, you
So the LoginServer.cs should have an OnOperationRequest function to handle the login information or should i be using the one inside the OutgoingMasterServerPeer.cs OnOperationRequest function to handle the information?
Thanks for the reply.
dragagon
Fri, 12/02/2011 - 16:45
Permalink
I sat down to record the next
I sat down to record the next video last night, but things didn't work out. I will be getting another video, possibly more, up this weekend. The next video will cover modifying the OutgoingMasterServerPeer to use the Handlers so that the Login server can begin to handle that data.