Squeak Class Documentation category index | class index  
 
ConnectionQueue
  category: Network-Kernel
  superclass: Object
  subclasses:

A ConnectionQueue listens on a given port number and collects a queue of client connections. In order to handle state changes quickly, a ConnectionQueue has its own process that: (a) tries to keep a socket listening on the port whenever the queue isn't already full of connections and (b) prunes stale connections out of the queue to make room for fresh ones.

instance methods
  private
  initPortNumber:queueLength:
listenLoop
oldStyleListenLoop
pruneStaleConnections

  public
  connectionCount
destroy
getConnectionOrNil
getConnectionOrNilLenient
isValid

class methods
  instance creation
  portNumber:queueLength:

instance methods
  private top  
 

initPortNumber:queueLength:

Private! Initialize the receiver to listen on the given port number. Up to queueLength connections will be queued.


 

listenLoop

Private! This loop is run in a separate process. It will establish up to maxQueueLength connections on the given port.


 

oldStyleListenLoop

Private! This loop is run in a separate process. It will establish up to maxQueueLength connections on the given port.


 

pruneStaleConnections

Private! The client may establish a connection and then disconnect while it is still in the connection queue. This method is called periodically to prune such sockets out of the connection queue and make room for fresh connections.


  public top  
 

connectionCount

Return an estimate of the number of currently queued connections. This is only an estimate since a new connection could be made, or an existing one aborted, at any moment.


 

destroy

Terminate the listener process and destroy all sockets in my possesion.


 

getConnectionOrNil

Return a connected socket, or nil if no connection has been established.


 

getConnectionOrNilLenient

Return a connected socket, or nil if no connection has been established.


 

isValid


class methods
  instance creation top  
 

portNumber:queueLength: