FX::FXSocket Class Reference

#include <FXSocket.h>

Inheritance diagram for FX::FXSocket:

Inheritance graph
[legend]

List of all members.


Detailed Description

Socket i/o device.

Public Types

enum  {
  OtherRead, OtherWrite, OtherExec, OtherReadWrite,
  OtherFull, GroupRead, GroupWrite, GroupExec,
  GroupReadWrite, GroupFull, OwnerRead, OwnerWrite,
  OwnerExec, OwnerReadWrite, OwnerFull, Hidden,
  Directory, File, SymLink, SetUser,
  SetGroup, Sticky, Character, Block,
  Socket, Fifo
}
enum  {
  NoAccess, ReadOnly, WriteOnly, ReadWrite,
  Append, Truncate, Create, Exclusive,
  NonBlocking, TextTranslate, Reading, Writing
}
enum  { Begin, Current, End }

Public Member Functions

 FXSocket ()
 FXSocket (FXInputHandle handle, FXuint mode)
virtual bool open (FXInputHandle handle, FXuint mode)
virtual FXival readBlock (void *data, FXival count)
virtual FXival writeBlock (const void *data, FXival count)
virtual bool close ()
virtual ~FXSocket ()
virtual bool isOpen () const
FXuint mode () const
virtual FXlong position () const
virtual FXlong position (FXlong offset, FXuint from=FXIO::Begin)
virtual FXlong truncate (FXlong size)
virtual bool flush ()
virtual bool eof ()
virtual FXlong size ()

Protected Attributes

FXInputHandle device
FXuint access

Member Enumeration Documentation

anonymous enum [inherited]

File modes.

Enumerator:
OtherRead  Permissions.
OtherWrite  Others have read permission.
OtherExec  Others have write permisson.
OtherReadWrite  Others have execute permission.
OtherFull  Others have read and write permission.
GroupRead  Others have full access.
GroupWrite  Group has read permission.
GroupExec  Group has write permission.
GroupReadWrite  Group has execute permission.
GroupFull  Group has read and write permission.
OwnerRead  Group has full access.
OwnerWrite  Owner has read permission.
OwnerExec  Owner has write permission.
OwnerReadWrite  Owner has execute permission.
OwnerFull  Owner has read and write permission.
Hidden  Owner has full access.

Other flags

Directory  Hidden file.
File  Is directory.
SymLink  Is regular file.
SetUser  Is symbolic link.

Special mode bits

SetGroup  Set user id.
Sticky  Set group id.
Character  Sticky bit.

Device special files

Block  Character device.
Socket  Block device.
Fifo  Socket device.

anonymous enum [inherited]

Access modes.

Enumerator:
NoAccess  Basic access options.
ReadOnly  No access.
WriteOnly  Open for reading.
ReadWrite  Open for writing.
Append  Open for read and write.
Truncate  Open for append.
Create  Truncate to zero when writing.
Exclusive  Create if it doesn't exist.
NonBlocking  Fail if trying to create a file which already exists.
TextTranslate  Non-blocking i/o.
Reading  Perform text translation.

Convenience access options

Writing  Normal options for reading.

anonymous enum [inherited]

Positioning modes.

Enumerator:
Current  Position from the begin (default).
End  Position relative to current position.


Constructor & Destructor Documentation

FX::FXSocket::FXSocket (  )  [inline]

Construct socket.

FX::FXSocket::FXSocket ( FXInputHandle  handle,
FXuint  mode 
)

Construct file and attach existing handle h.

virtual FX::FXSocket::~FXSocket (  )  [virtual]

Destroy.


Member Function Documentation

virtual bool FX::FXSocket::open ( FXInputHandle  handle,
FXuint  mode 
) [virtual]

Open device with access mode and handle.

Reimplemented from FX::FXIO.

virtual FXival FX::FXSocket::readBlock ( void *  data,
FXival  count 
) [virtual]

Read block of bytes, returning number of bytes read.

Reimplemented from FX::FXIO.

virtual FXival FX::FXSocket::writeBlock ( const void *  data,
FXival  count 
) [virtual]

Write block of bytes, returning number of bytes written.

Reimplemented from FX::FXIO.

virtual bool FX::FXSocket::close (  )  [virtual]

Close socket.

Reimplemented from FX::FXIO.

virtual bool FX::FXIO::isOpen (  )  const [virtual, inherited]

Return true if open.

FXuint FX::FXIO::mode (  )  const [inline, inherited]

Return access mode.

virtual FXlong FX::FXIO::position (  )  const [virtual, inherited]

Return handle.

Attach existing device handle Detach device handle Get current file position

Reimplemented in FX::FXFile.

virtual FXlong FX::FXIO::position ( FXlong  offset,
FXuint  from = FXIO::Begin 
) [virtual, inherited]

Change file position, returning new position from start.

Reimplemented in FX::FXFile.

virtual FXlong FX::FXIO::truncate ( FXlong  size  )  [virtual, inherited]

Truncate file.

Reimplemented in FX::FXFile.

virtual bool FX::FXIO::flush (  )  [virtual, inherited]

Flush to disk.

Reimplemented in FX::FXFile.

virtual bool FX::FXIO::eof (  )  [virtual, inherited]

Test if we're at the end.

Reimplemented in FX::FXFile.

virtual FXlong FX::FXIO::size (  )  [virtual, inherited]

Return size of i/o device.

Reimplemented in FX::FXFile.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:16:16 2008 for TnFOX by doxygen v1.5.6