class otnetObject

Abstract interface of a network class

Public Methods

static void init()
Static initialisation routine
virtual int objFromSocket( int file_descriptor)
Pure virtual function that is defined by the derived concrete class
virtual int objToSocket( int file_descriptor )
Pure virtual function that is defined by the derived concrete class
otnetObject()
empty constructor
static int readSocket( int fd, const void *pData, int nBytes, BOOL bNoSwap = false )
Reads nbytes of data from a socket given by the file descriptor fd
static int writeSocket( int fd, const void *pData, int nBytes, BOOL bNoSwap = false )
Writes nbytes of data into a socket given by the file descriptor fd

Protected Fields

static BOOL bSwapBytes
True of have to swap the bytes from the host byte order to the network byte order
int otnetTrfHeader
A transfer header that can be used to determine byte swapping properties

Documentation

Abstract interface of a network class. It can be used as a base class for any object which is meant to be transferable over the network to a client on another host. Its main properties have been copied of the serializable interface of java.

Modifications:

otnetObject()
empty constructor

static void init()
Static initialisation routine. Has to be called once by every application in order to find out the network byte ordering of the host.

static int writeSocket( int fd, const void *pData, int nBytes, BOOL bNoSwap = false )
Writes nbytes of data into a socket given by the file descriptor fd. If bNoSwap is false, we do swap the bytes into the network byte ordering. If bNoSwap is true, we never swap the bytes.

static int readSocket( int fd, const void *pData, int nBytes, BOOL bNoSwap = false )
Reads nbytes of data from a socket given by the file descriptor fd. If bNoSwap is false, we do swap the bytes into the network byte ordering. If bNoSwap is true, we never swap the bytes.

virtual int objToSocket( int file_descriptor )
Pure virtual function that is defined by the derived concrete class. Has all the necessary code to read on object from a socket given by the file descriptor file_descriptor.

virtual int objFromSocket( int file_descriptor)
Pure virtual function that is defined by the derived concrete class. Has all the necessary code to write an object into a socket given by the file descriptor file_descriptor.

static BOOL bSwapBytes
True of have to swap the bytes from the host byte order to the network byte order

int otnetTrfHeader
A transfer header that can be used to determine byte swapping properties


This class has no child classes.
Author:
C.Witzig
Date: May 23, 1999
Version:
Last update:

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de