Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2014, 08:19 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default EQStream and EQStreamFactory

I've been going through the server code and have a couple of questions around EQStream::Write and EQStreamFactory::WriterLoop.

The Write method limits the number of bytes sent per stream and it looks like the Decay timer in WriterLoop is used to gradually reduce the # of bytes sent. Is the purpose to keep one client from potentially starving the other connected clients, is this to keep from maxing out the server's UDP buffer, or is it a combination or some other reason?

Thank you!
Reply With Quote
  #2  
Old 02-20-2014, 08:44 AM
image
Demi-God
 
Join Date: Jan 2002
Posts: 1,290
Default

I looked over it briefly and this looks like the way the datarate is handled (so we don't throw too much data at the client than their line supports, was big back in dialup days). The client used to be able to set this manually with /datarate it is in this case automated into OP_SessionStatRequest/OP_SessionStatResponse. The decay is removing (every 20ms I guess) the datarate byte count from bytes written to the client. The lower this value is the more likely we are to send new data out (BytesWritten needs to be less than RateThreshold to send out new data).


RateThreshold=1048576/250;
DecayRate=78642/250;

Keep in mind these default values can change inside OP_SessionStatRequest which is also part of EQStream.cpp.
__________________
www.eq2emu.com
EQ2Emu Developer
Former EQEMu Developer / GuildWars / Zek Seasons Servers
Member of the "I hate devn00b" club.
Reply With Quote
  #3  
Old 02-20-2014, 04:08 PM
daerath
Sarnak
 
Join Date: Jan 2011
Location: Northern VA
Posts: 91
Default

Quote:
Originally Posted by image View Post
I looked over it briefly and this looks like the way the datarate is handled (so we don't throw too much data at the client than their line supports, was big back in dialup days). The client used to be able to set this manually with /datarate it is in this case automated into OP_SessionStatRequest/OP_SessionStatResponse. The decay is removing (every 20ms I guess) the datarate byte count from bytes written to the client. The lower this value is the more likely we are to send new data out (BytesWritten needs to be less than RateThreshold to send out new data).


RateThreshold=1048576/250;
DecayRate=78642/250;

Keep in mind these default values can change inside OP_SessionStatRequest which is also part of EQStream.cpp.
Ahh, that makes sense that it's a client provided value. I haven't looked at the OP_SessionStatRequest/Response yet. Glad to know I was in the right ballpark!

Thanks for the response. Back to code spelunking!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:55 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3