MFEM v2.0
|
#include <isockstream.hpp>
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 |
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.
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.
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] |
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.
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().