lua-users home
lua-l archive

Re: Using luasocket to read from the keyboard

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Further to my question about 65 simultaneous connections. I had the idea of running two copies of my stress-test program, to see if the server still reported 65 players (and thus the server would not handle more than 65 at a time), or whether it would reach 130 players. Without wishing to bore you with lots of randomly-generated names, these are my results:
 2 Warrior Acilactred the Recruit.
 2 Augurer Goniver the Understudy of Magic.
 2 Thief Grodus the Footpad.
... etc etc ...
 1 Thief Erauw the Pilferess.
 1 Warrior Dweimas the Swordpupil.
 1 Warrior Glemos the Swordpupil.
----------------------------------- [ IMMORTALS ]------------------------------
Supreme Entity Admin the Attendant.
130 players.
It seems that simply running two copies of the identical Lua script, which attempts to make 200 connections, results in 130 connections - 65 per copy. That seems to indicate that 65 is some sort of limiting factor inside luasocket.
... time passes ....
Well, this is a laugh. This particular script *was* running on Windows, so it seems that 64 or 65 is some sort of limitation on a Windows program calling select under luasocket (or indeed, anywhere). However when I ran it on a Unix look-alike (OS/X) it successfully made 200 connections, and interacted with them. Here are the new results:
 1 Mage Clilarka the Apprentice of Magic.
 2 Druid Ereranyth the Attendant.
 1 Cleric Silara the Believer.
... and so on ...
 1 Vampire Wiciradfrid the Apprentice of Blood.
 1 Mage Tirangwen the Apprentice of Magic.
----------------------------------- [ IMMORTALS ]------------------------------
Supreme Entity Admin the Attendant.
329 players.
This demonstrates the server can handle 329 players, the OS/X version of luasocket can make 200 connections, and the Windows version made 64 each. Well, that sort-of adds up to 329, a couple of the bots got killed. ;) I think we can safely speculate that World of Warcraft is not implemented using Windows Sockets. :P
- Nick

AltStyle によって変換されたページ (->オリジナル) /