class
   StreamingController::ConnectionPool
 
  - StreamingController::ConnectionPool
 - Reference
 - Object
 
Overview
Limits the number of long-lived connections.
Limits the number of long-lived connections by maintaining a pool of connections. When the pool is full, adding a new connection closes the oldest connection.
A "connection" is any subclass of IO.
Defined in:
controllers/streaming.crConstructors
Instance Method Summary
- 
        #capacity
        
          
Returns the capacity of the pool.
 - 
        #includes?(connection)
        
          
Returns
trueif the pool includesconnection. - 
        #push(connection)
        
          
Pushes
connectioninto the pool. - 
        #size
        
          
Returns the number of connections in the pool.
 
Constructor Detail
Instance Method Detail
        
        def push(connection)
        #
      
      
        Pushes connection into the pool.
If the pool is at capacity, the oldest connection is closed, removed from the pool, and returned.