sure - never heared sth about queues? - it was used before threads came
u go throught a queue of users and do what they requested.
if 2 request a map u send one use some bytes (usually a few packets), and go to the next one - send him some bytes, go to the next one handle some movement send update packet(s) and contiunue....
there are many mechanisms to move trought the queue - like timed, or iteration based...
Anonymous - Tue Aug 14, 2007 7:40 am
Post subject:
//should register, so i can edit my postings
Wanna have a proove that subgame (v1.34) doesnt use threads?
open up the taskmanager
go to processes
view - column setup - activate threads.
then start a local subgame
after connection to the biller, there will be 2 threads shown...
connect the client...
did the threadcount increase?
NO?
==> NO threads
PS: the same as catid's Biller rc 10
it can be that there is a newer subgame server - since the one i use (v1.34) was downloaded some years back - but i didnt find a newer version...
Cyan~Fire - Tue Aug 14, 2007 10:27 am
Post subject:
Yeah because while (true)
{
while (connection.gotPackets())
connection.processPacket();
} |
is so much more efficient than just having a blocking recv call... And your "proof" that it uses threads is not even close. Ever thought that maybe winsock or some other system service starts up a thread for itself? But nevermind me, I'm just a newbie and you're obviously far more experienced than me.
Anonymous - Tue Aug 14, 2007 12:04 pm
Post subject:
ok no one said that im a 1337 L33t haxx0r coder or such stupid shit - there is allways someone who is better than SELF...
I also dont wanna have the whole community against me...
==> last post from me on thi topic - which was "how to delete a user from the biller" btw
yr proof seems better... but its a little small and doesnt really prove anything (could be the mainloop and the queuehandler)
as with UDP you have to receive the packets and can then determine what session it belongs to...
(so u have the queue somewhere - like in the socket buffer and recv will read the first packet and handle it...)
im not fammiliar with winsock so dunno how it works...
but, I have never heared of an unattached thread...
every thread is attached to the process where it was created in (and it doesnt depend on who created the thread) ... would be fatal otherwise...
and i cant see any new threads attached in subgame nor in subbill after connecting...
... would be interesting to see some src...
PS: a queue is more efficient than a call?
you wanna say that polling is more efficient than interrupts? O_o
Anonymous - Tue Aug 14, 2007 12:20 pm
Post subject:
OMG - im a dumbfuck....
... i just realised that the game uses udp... and that its useless to have more than 2 threads (1 thread for recevice; 1 thread for send)
... was kinda using TCP toooo long ...
couldnt u say that earlier?
btw: then i dont understand the cpu usage ... WHYYYYY?
EOD
PS: why udp? - tcp is (much more) reliable and its harder to attack AND its easier to differenciate between the connections...
Cyan~Fire - Tue Aug 14, 2007 12:29 pm
Post subject:
It uses UDP because UDP is faster. It has a reliable packet layer on top of the UDP, but only certain packets are sent reliably. This makes for a nice compromise between reliability for important packets and speed for common packets (player positions, etc.).
D1st0rt - Tue Aug 14, 2007 12:29 pm
Post subject:
I think you just lost any credibility you might have had right there
edit: CURSE YOU CYAN
Smong - Tue Aug 14, 2007 6:04 pm
Post subject:
Try and cut down on the flaming people.
As for the biller IP in asss settings, I believe domain names aren't allowed to prevent DNS attacks.
Subgame/subill are supposed to be notorious for CPU usage, every now and then someone posts server.ini settings to fix it. Also I think there is a patched subbill.exe somewhere out there too.