00001 /* 00002 * spxsock.h 00003 * 00004 * SPX socket channel class 00005 * 00006 * Portable Windows Library 00007 * 00008 * Copyright (c) 1993-1998 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Portable Windows Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions are Copyright (C) 1993 Free Software Foundation, Inc. 00025 * All Rights Reserved. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Revision: 20385 $ 00030 * $Author: rjongbloed $ 00031 * $Date: 2008-06-04 10:40:38 +0000 (Wed, 04 Jun 2008) $ 00032 */ 00033 00034 #ifndef _PSPXSOCKET 00035 #define _PSPXSOCKET 00036 00037 #ifdef P_USE_PRAGMA 00038 #pragma interface 00039 #endif 00040 00041 #include <ptlib/ipxsock.h> 00042 00043 00047 class PSPXSocket : public PIPXSocket 00048 { 00049 PCLASSINFO(PSPXSocket, PIPXSocket); 00050 00051 public: 00060 PSPXSocket( 00061 WORD port = 0 00062 ); 00064 00080 virtual PBoolean Listen( 00081 unsigned queueSize = 5, 00082 WORD port = 0, 00083 Reusability reuse = AddressIsExclusive 00084 ); 00085 00100 virtual PBoolean Accept( 00101 PSocket & socket 00102 ); 00104 00105 protected: 00106 virtual PBoolean OpenSocket(); 00107 virtual const char * GetProtocolName() const; 00108 00109 00110 // Include platform dependent part of class 00111 #ifdef _WIN32 00112 #include "msos/ptlib/spxsock.h" 00113 #else 00114 #include "unix/ptlib/spxsock.h" 00115 #endif 00116 }; 00117 00118 #endif 00119 00120 // End Of File ///////////////////////////////////////////////////////////////