![]() |
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,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (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 * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXSocket.h,v 1.12 2009/01/06 13:07:27 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXSOCKET_H 00024 #define FXSOCKET_H 00025 00026 #ifndef FXIO_H 00027 #include "FXIO.h" 00028 #endif 00029 00030 00031 //////////////////////////// UNDER DEVELOPMENT //////////////////////////////// 00032 00033 00034 namespace FX { 00035 00036 00037 /** 00038 * Socket i/o device. 00039 */ 00040 class FXAPI FXSocket : public FXIO { 00041 private: 00042 FXSocket(const FXSocket&); 00043 FXSocket &operator=(const FXSocket&); 00044 public: 00045 00046 /// Construct socket 00047 FXSocket(){ } 00048 00049 /// Construct file and attach existing handle h 00050 FXSocket(FXInputHandle h,FXuint m); 00051 00052 /// Open device with access mode and handle 00053 virtual FXbool open(FXInputHandle h,FXuint m); 00054 00055 /// Read block of bytes, returning number of bytes read 00056 virtual FXival readBlock(void* data,FXival count); 00057 00058 /// Write block of bytes, returning number of bytes written 00059 virtual FXival writeBlock(const void* data,FXival count); 00060 00061 /// Close socket 00062 virtual FXbool close(); 00063 00064 /// Destroy 00065 virtual ~FXSocket(); 00066 }; 00067 00068 } 00069 00070 #endif
![]() |