00001 /* 00002 * ipdsock.h 00003 * 00004 * IP Datagram socket I/O 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 * $Log: ipdsock.h,v $ 00030 * Revision 1.11 2005/11/25 03:43:47 csoutheren 00031 * Fixed function argument comments to be compatible with Doxygen 00032 * 00033 * Revision 1.10 2003/09/17 05:41:58 csoutheren 00034 * Removed recursive includes 00035 * 00036 * Revision 1.9 2003/09/17 01:18:02 csoutheren 00037 * Removed recursive include file system and removed all references 00038 * to deprecated coooperative threading support 00039 * 00040 * Revision 1.8 2002/09/16 01:08:59 robertj 00041 * Added #define so can select if #pragma interface/implementation is used on 00042 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00043 * 00044 * Revision 1.7 2001/05/22 12:49:32 robertj 00045 * Did some seriously wierd rewrite of platform headers to eliminate the 00046 * stupid GNU compiler warning about braces not matching. 00047 * 00048 * Revision 1.6 1999/03/09 02:59:49 robertj 00049 * Changed comments to doc++ compatible documentation. 00050 * 00051 * Revision 1.5 1999/02/16 08:12:00 robertj 00052 * MSVC 6.0 compatibility changes. 00053 * 00054 * Revision 1.4 1998/11/14 06:28:09 robertj 00055 * Fixed error in documentation 00056 * 00057 * Revision 1.3 1998/09/23 06:20:43 robertj 00058 * Added open source copyright license. 00059 * 00060 * Revision 1.2 1996/09/14 13:09:20 robertj 00061 * Major upgrade: 00062 * rearranged sockets to help support IPX. 00063 * added indirect channel class and moved all protocols to descend from it, 00064 * separating the protocol from the low level byte transport. 00065 * 00066 * Revision 1.1 1996/05/15 21:11:16 robertj 00067 * Initial revision 00068 * 00069 */ 00070 00071 #ifndef _PIPDATAGRAMSOCKET 00072 #define _PIPDATAGRAMSOCKET 00073 00074 #ifdef P_USE_PRAGMA 00075 #pragma interface 00076 #endif 00077 00080 class PIPDatagramSocket : public PIPSocket 00081 { 00082 PCLASSINFO(PIPDatagramSocket, PIPSocket); 00083 protected: 00087 PIPDatagramSocket(); 00088 00089 00090 public: 00091 // New functions for class 00096 virtual BOOL ReadFrom( 00097 void * buf, 00098 PINDEX len, 00099 Address & addr, 00100 WORD & port 00101 ); 00102 00107 virtual BOOL WriteTo( 00108 const void * buf, 00109 PINDEX len, 00110 const Address & addr, 00111 WORD port 00112 ); 00113 00114 00115 // Include platform dependent part of class 00116 #ifdef _WIN32 00117 #include "msos/ptlib/ipdsock.h" 00118 #else 00119 #include "unix/ptlib/ipdsock.h" 00120 #endif 00121 }; 00122 00123 #endif 00124 00125 // End Of File ///////////////////////////////////////////////////////////////