Multiple SmartFoxClients

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

Korror
Posts: 2
Joined: 27 Jul 2010, 17:26

Multiple SmartFoxClients

Postby Korror » 27 Jul 2010, 17:32

Hello, I'm attempting to stress test an existing unity based MMO using SmartFox but I've run into difficulties and I was wondering if my current approach was possible.

I'm creating multiple threads in C# and having them initialize a smart fox client and then connect to the server. I've been able to connect one client at time to the server when when I try to make another one in a different thread, it crashes. I think the issue is that when smartFoxClient initializes, it populates a static hash table so when future client are initialized,
they try to populate the same table with the same values but I could be mistaken.

Anyone know if creating multiple smartfox clients in the same process is possible or if my approach is flawed. If it's no possible, how would you go about this? I'd rather not try to run 100 instances of unity at the same time just to check how the server handles heavy load.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 27 Jul 2010, 19:02

Hi,

It is not possible without you modifying the way callbacks are handled, sorry. The event registration should be an instance variable to the client - right now its a global one. So cant have multiple clients.

SFS2X will have this fixed - but that doesnt help you right now.

/Thomas
Korror
Posts: 2
Joined: 27 Jul 2010, 17:26

Postby Korror » 27 Jul 2010, 19:38

Bah, and I thought I was being so clever too. At least I know it wasn't something else wrong with my code.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 25 guests