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