Archived
This forum has been archived. Please start a new discussion on GitHub.
Question Regarding Slice Interface "Best practices"
Here is my current Slice Interface:
Now I am creating a Quest Manager should I add a acceptQuest method to my ServerI interface and then in the method have questMgr->acceptQuest() or should I make a new Interface for the Quest Manager so I can call acceptQuest() directly from the client?
My main problem is that I have been told that you should limit the number of connections between the client and the server so I guess what I should really be asking is if it creates a new connection for every interface you have access to from the client.
module MMOInteractive { struct PlayerData { short networkID; string title; float posX; float posY; }; interface Peer { void onDisconnected(); void onConnectionLost(); void onEnterWorld(PlayerData mainPlayer, string welcomeMsg); void onPlayerEnter(PlayerData newPlayer); void onPlayerExit(short playerNetID); void onPlayerWalkTo(short playerNetID, float x, float y, float duration); void onPlayerSay(short playerNetID, string message); PlayerData getData(); void loadWaterObject(string meshName, string name, string matName, int x, int y, int z, int scale); void loadStaticObject(string meshName, string name, string matName, int x, int y, int z, int scale); }; interface ServerI { bool Authenticate(string username, string password); void handleClientEnterWorld(string charName, Peer* user); void handleClientWalk(short netID, int X, int Y); void handleClientSay(short netID, string Message); }; };
Now I am creating a Quest Manager should I add a acceptQuest method to my ServerI interface and then in the method have questMgr->acceptQuest() or should I make a new Interface for the Quest Manager so I can call acceptQuest() directly from the client?
My main problem is that I have been told that you should limit the number of connections between the client and the server so I guess what I should really be asking is if it creates a new connection for every interface you have access to from the client.
0
Comments
-
MMOInteractive wrote: »My main problem is that I have been told that you should limit the number of connections between the client and the server so I guess what I should really be asking is if it creates a new connection for every interface you have access to from the client.
No, Ice does not automatically create a new connection for every interface that you use from your client. You should take a look at the Connection Management chapter of the manual for more detailed information on connections. Let us know if you need more clarification.0