00001 /*****************************************************************************
00002 * Author: Valient Gough <vgough@pobox.com>
00003 *
00004 *****************************************************************************
00005 * Copyright (c) 2001, Valient Gough
00006 *
00007 * This library is free software; you can distribute it and/or modify it under
00008 * the terms of the GNU Lesser General Public License (LGPL), as published by
00009 * the Free Software Foundation; either version 2.1 of the License, or (at your
00010 * option) any later version.
00011 *
00012 * This library is distributed in the hope that it will be useful, but WITHOUT
00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 * FITNESS FOR A PARTICULAR PURPOSE. See the LGPL in the file COPYING for more
00015 * details.
00016 *
00017 */
00018
00019 #ifndef _SocketServer_incl_
00020 #define _SocketServer_incl_
00021
00022 #include <rel-server/ServerConnector.h>
00023
00024 namespace rel
00025 {
00026
00027 class SocketServer : public ServerConnector
00028 {
00029 public:
00030 SocketServer();
00031 SocketServer(int portNum);
00032 ~SocketServer();
00033
00034
00035 bool initialize(int portNum);
00036
00037 /*
00038 server tasks:
00039 - bind socket to address
00040 - listen on connection address
00041 - accept connection
00042
00043 */
00044 SmartPtr<IODevice> accept();
00045
00046 private:
00047
00048 int fSock;
00049 };
00050
00051 } // namespace rel
00052
00053 #endif
00054
00055
1.2.10 written by Dimitri van Heesch,
© 1997-2001