Made to Order Software Corporation Logo

LLChatLib: LLIOServerSocket Class Reference

LLIOServerSocket Class Reference

An IOPipe implementation which listens and spawns connected sockets. More...

#include <lliosocket.h>

Inheritance diagram for LLIOServerSocket:
Collaboration diagram for LLIOServerSocket:

List of all members.

Public Member Functions

 LLIOServerSocket (apr_pool_t *pool, socket_t listener, factory_t reactor)
void setResponseTimeout (F32 timeout_secs)
 Set the timeout for the generated chains.

Protected Member Functions

virtual EStatus process_impl (const LLChannelDescriptors &channels, buffer_ptr_t &buffer, bool &eos, LLSD &context, LLPumpIO *pump)
 Process the data in buffer.


Detailed Description

An IOPipe implementation which listens and spawns connected sockets.

See also:
LLIOPipe, LLChainIOFactory

Each server socket instance coordinates with a pump to ensure it only processes waiting connections. It uses the provided socket, and assumes it is correctly initialized. When the connection is established, the server will call the chain factory to build a chain, and attach a socket reader and the front and a socket writer at the end. It is up to the chain factory to create something which correctly handles the established connection using the reader as a source, and the writer as the final sink. The newly added chain timeout is in DEFAULT_CHAIN_EXPIRY_SECS unless adjusted with a call to setResponseTimeout().


Constructor & Destructor Documentation

LLIOServerSocket::LLIOServerSocket ( apr_pool_t *  pool,
LLIOServerSocket::socket_t  listener,
factory_t  factory 
)

Member Function Documentation

void LLIOServerSocket::setResponseTimeout ( F32  timeout_secs  ) 

Set the timeout for the generated chains.

This value is passed directly to the LLPumpIO::addChain() method. The default on construction is set to DEFAULT_CHAIN_EXPIRY_SECS which is a reasonable value for most applications based on this library. Avoid passing in NEVER_CHAIN_EXPIRY_SECS unless you have another method of harvesting chains.

Parameters:
timeout_secs The seconds before timeout for the response chain.

The documentation for this class was generated from the following files:
  • /home/doug/src/oss/slitechat/trunk/LLChatLib/llmessage/lliosocket.h
  • /home/doug/src/oss/slitechat/trunk/LLChatLib/llmessage/lliosocket.cpp
Generated on Thu Sep 23 17:18:42 2010 for LLChatLib by  doxygen 1.6.3