## modules/up/src/Core/sys/Listener.cc

/* [<][>][^][v][top][bottom][index][help] */

## FUNCTIONS

This source file includes following functions.

1. listenReady
2. Listener

       1 //
       2 // $Id: Listener.cc,v 1.1.1.1 2000/03/10 16:32:20 engin Exp $
       3 //
       4 // Author(s): Ramesh Govindan
       5
       6 #ifdef HAVE_CONFIG_H
       7 #include <config.h>
       8 #endif
       9
      10 #include "util/Types.hh"
      11 #include "util/Trail.hh"
      12 #include "util/Handler.hh"
      13 #include "util/Buffer.hh"
      14 #include "sys/File.hh"
      15 #include "sys/Listener.hh"
      16
      17 void
      18 listenReady(void* ptr,
         /* [<][>][^][v][top][bottom][index][help] */
      19             void*)
      20 {
      21     ((Listener*) ptr)->accept();
      22 }
      23
      24 Listener::Listener(Port port,
         /* [<][>][^][v][top][bottom][index][help] */
      25                    Boolean local)
      26 {
      27     Handler     ah(listenReady, this);
      28
      29     socket = new ListenSocket(port, ah, local);
      30     return;
      31 }
      32
      33 //  Copyright (c) 1994 by the University of Southern California.
      34 //  All rights reserved.
      35 //
      36 //  Permission to use, copy, modify, and distribute this software and
      37 //  its documentation in source and binary forms for lawful
      38 //  non-commercial purposes and without fee is hereby granted, provided
      39 //  that the above copyright notice appear in all copies and that both
      40 //  the copyright notice and this permission notice appear in supporting
      41 //  documentation, and that any documentation, advertising materials,
      42 //  and other materials related to such distribution and use acknowledge
      43 //  that the software was developed by the University of Southern
      44 //  California and/or Information Sciences Institute.
      45 //  The name of the University of Southern California may not
      46 //  be used to endorse or promote products derived from this software
      47 //  without specific prior written permission.
      48 //
      49 //  THE UNIVERSITY OF SOUTHERN CALIFORNIA DOES NOT MAKE ANY REPRESENTATIONS
      50 //  ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  THIS SOFTWARE IS
      51 //  PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
      52 //  INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
      53 //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND
      54 //  NON-INFRINGEMENT.
      55 //
      56 //  IN NO EVENT SHALL USC, OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
      57 //  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT,
      58 //  TORT, OR OTHER FORM OF ACTION, ARISING OUT OF OR IN CONNECTION WITH,
      59 //  THE USE OR PERFORMANCE OF THIS SOFTWARE.
      60 //
      61 //  Questions concerning this software should be directed to
      62 //  info-ra@isi.edu.
      63 //
      64

/* [<][>][^][v][top][bottom][index][help] */