ipdsock.h

Go to the documentation of this file.
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  * $Revision: 20624 $
00030  * $Author: rjongbloed $
00031  * $Date: 2008-07-25 23:56:27 +0000 (Fri, 25 Jul 2008) $
00032  */
00033 
00034 #ifndef _PIPDATAGRAMSOCKET
00035 #define _PIPDATAGRAMSOCKET
00036 
00037 #ifdef P_USE_PRAGMA
00038 #pragma interface
00039 #endif
00040 
00041 #include <ptlib/ipsock.h>
00042 
00045 class PIPDatagramSocket : public PIPSocket
00046 {
00047   PCLASSINFO(PIPDatagramSocket, PIPSocket);
00048   protected:
00052     PIPDatagramSocket();
00053 
00054 
00055   public:
00056   // New functions for class
00061     virtual PBoolean ReadFrom(
00062       void * buf,     
00063       PINDEX len,     
00064       Address & addr, 
00065       WORD & port     
00066     );
00067 
00072     virtual PBoolean WriteTo(
00073       const void * buf,   
00074       PINDEX len,         
00075       const Address & addr, 
00076       WORD port           
00077     );
00078 
00079 
00080 // Include platform dependent part of class
00081 #ifdef _WIN32
00082 #include "msos/ptlib/ipdsock.h"
00083 #else
00084 #include "unix/ptlib/ipdsock.h"
00085 #endif
00086 };
00087 
00088 #endif
00089 
00090 // End Of File ///////////////////////////////////////////////////////////////

Generated on Mon Sep 15 01:21:35 2008 for PTLib by  doxygen 1.5.1