MFEM v2.0
Public Member Functions | Private Member Functions | Private Attributes
isockstream Class Reference

#include <isockstream.hpp>

List of all members.

Public Member Functions

 isockstream (int port)
bool good ()
void receive (istringstream **in)
 Start waiting for data and return it in an input stream.
 ~isockstream ()

Private Member Functions

int establish ()
int read_data (int socketid, char *buf, int size)

Private Attributes

int portnum
int portID
int socketID
int error
char * Buf

Detailed Description

Data type for input socket stream class. The class is used as server to receive data from a client on specified port number. The user gets data from the stream as from any other input stream. This class is DEPRECATED. New code should use class socketserver (see "socketstream.hpp").

Definition at line 23 of file isockstream.hpp.


Constructor & Destructor Documentation

isockstream::isockstream ( int  port) [explicit]

The constructor takes as input the portnumber port on which it establishes a server.

Definition at line 24 of file isockstream.cpp.

References Buf, establish(), portID, and portnum.

isockstream::~isockstream ( )

Virtual destructor. If the data hasn't been sent it sends it.

Definition at line 141 of file isockstream.cpp.

References Buf, and portID.


Member Function Documentation

int isockstream::establish ( ) [private]

Definition at line 34 of file isockstream.cpp.

References error, and portnum.

Referenced by isockstream().

bool isockstream::good ( ) [inline]

Definition at line 38 of file isockstream.hpp.

int isockstream::read_data ( int  socketid,
char *  buf,
int  size 
) [private]

Definition at line 81 of file isockstream.cpp.

References error.

Referenced by receive().

void isockstream::receive ( istringstream **  in)

Start waiting for data and return it in an input stream.

Definition at line 101 of file isockstream.cpp.

References Buf, error, portID, read_data(), and socketID.


Member Data Documentation

char* isockstream::Buf [private]

Definition at line 27 of file isockstream.hpp.

Referenced by isockstream(), receive(), and ~isockstream().

int isockstream::error [private]

Definition at line 26 of file isockstream.hpp.

Referenced by establish(), read_data(), and receive().

int isockstream::portID [private]

Definition at line 26 of file isockstream.hpp.

Referenced by isockstream(), receive(), and ~isockstream().

int isockstream::portnum [private]

Definition at line 26 of file isockstream.hpp.

Referenced by establish(), and isockstream().

int isockstream::socketID [private]

Definition at line 26 of file isockstream.hpp.

Referenced by receive().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines