Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXSocket.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * S o c k e t C l a s s *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2005,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXSocket.h,v 1.6 2006/01/22 17:58:09 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXSOCKET_H
25 #define FXSOCKET_H
26 
27 #ifndef FXIO_H
28 #include "FXIO.h"
29 #endif
30 
31 
32 //////////////////////////// UNDER DEVELOPMENT ////////////////////////////////
33 
34 
35 namespace FX {
36 
37 
38 /**
39 * Socket i/o device.
40 */
41 class FXAPI FXSocket : public FXIO {
42 private:
43  FXSocket(const FXSocket&);
44  FXSocket &operator=(const FXSocket&);
45 public:
46 
47  /// Construct socket
48  FXSocket(){ }
49 
50  /// Construct file and attach existing handle h
51  FXSocket(FXInputHandle handle,FXuint mode);
52 
53  /// Open device with access mode and handle
54  virtual bool open(FXInputHandle handle,FXuint mode);
55 
56  /// Read block of bytes, returning number of bytes read
57  virtual FXival readBlock(void* data,FXival count);
58 
59  /// Write block of bytes, returning number of bytes written
60  virtual FXival writeBlock(const void* data,FXival count);
61 
62  /// Close socket
63  virtual bool close();
64 
65  /// Destroy
66  virtual ~FXSocket();
67  };
68 
69 }
70 
71 #endif
Socket i/o device.
Definition: FXSocket.h:41
unsigned int FXuint
Definition: fxdefs.h:389
#define FXAPI
Definition: fxdefs.h:122
long FXival
Definition: fxdefs.h:428
Definition: FX4Splitter.h:31
FXint FXInputHandle
Definition: fxdefs.h:461
FXIO manipulates a handle to an abstract i/o device.
Definition: FXIO.h:37

Copyright © 1997-2005 Jeroen van der Zijp