| Path: | lib/mues/listener.rb (CVS) |
| Last Update: | Sat Aug 18 22:54:10 -0700 2007 |
This file contains the MUES::Listener class: An abstract base class for "listener" objects. Instances of concrete derivatives of this class encapsulate the functionality of opening a "listening" IO object and then joining incoming connections on that IO object with an instance of MUES::IOEventFilter that is designed to service it.
Instances of this class‘s derivatives are usually constructed by a MUES::Config::ListenersSection object.
Concrete derivatives of this class will probably be interested in providing implementations of one or more of the following operations:
require 'mues/reactorproxy'
require 'mues/ioeventfilters'
class MySocketListener < MUES::Listener
def createOutputFilter( reactor )
clientSocket = self.io.accept
proxy = MUES::ReactorProxy::new( reactor, clientSocket )
return MUES::MyOutputFilter::new( clientSocket, reactorProxy )
end
def releaseOutputFilter( filter )
# no-op
end
end
$Id: listener.rb 1215 2004-06-14 06:02:09Z deveiant $
Copyright (c) 2000-2003 The FaerieMUD Consortium. All rights reserved.
This module is free software. You may use, modify, and/or redistribute this software under the terms of the Perl Artistic License. (See language.perl.com/misc/Artistic.html)
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.