Ruby 2.3.0 リファレンスマニュアル > ライブラリ一覧 > webrick/serverライブラリ > WEBrick::GenericServerクラス > tokens

instance method WEBrick::GenericServer#tokens

tokens -> Thread::SizedQueue[permalink][rdoc]

MaxClient の設定のために使われる Thread::SizedQueue オブジェクトを返します。Thread::SizedQueue オブジェクトのサイズは現在受け付けることのできるクライアントの数です。

MaxClient を知りたい場合は self.tokens.max です。 self.tokens.max - self.tokens.length が現在のクライアントの接続数です。