Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
00001 /******************************************************************************** 00002 * * 00003 * S o c k e t C l a s s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXSocket.h,v 1.6 2006/01/22 17:58:09 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXSOCKET_H 00025 #define FXSOCKET_H 00026 00027 #ifndef FXIO_H 00028 #include "FXIO.h" 00029 #endif 00030 00031 00032 //////////////////////////// UNDER DEVELOPMENT //////////////////////////////// 00033 00034 00035 namespace FX { 00036 00037 00038 /** 00039 * Socket i/o device. 00040 */ 00041 class FXAPI FXSocket : public FXIO { 00042 private: 00043 FXSocket(const FXSocket&); 00044 FXSocket &operator=(const FXSocket&); 00045 public: 00046 00047 /// Construct socket 00048 FXSocket(){ } 00049 00050 /// Construct file and attach existing handle h 00051 FXSocket(FXInputHandle handle,FXuint mode); 00052 00053 /// Open device with access mode and handle 00054 virtual bool open(FXInputHandle handle,FXuint mode); 00055 00056 /// Read block of bytes, returning number of bytes read 00057 virtual FXival readBlock(void* data,FXival count); 00058 00059 /// Write block of bytes, returning number of bytes written 00060 virtual FXival writeBlock(const void* data,FXival count); 00061 00062 /// Close socket 00063 virtual bool close(); 00064 00065 /// Destroy 00066 virtual ~FXSocket(); 00067 }; 00068 00069 } 00070 00071 #endif
Copyright © 1997-2005 Jeroen van der Zijp |