MFEM
v3.1
Finite element discretization library
|
#include <osockstream.hpp>
Public Member Functions | |
osockstream (int port, const char *hostname) | |
int | send () |
virtual | ~osockstream () |
Public Member Functions inherited from mfem::socketstream | |
socketstream () | |
socketstream (int s) | |
socketstream (const char hostname[], int port) | |
socketbuf * | rdbuf () |
int | open (const char hostname[], int port) |
int | close () |
bool | is_open () |
virtual | ~socketstream () |
Data type for output socket stream class. The class is used as client to send data to a server on a specified port number. One object of the class can be used for one time send of data to the server. The user writes in the stream, as in any other output stream and when the data is ready to be send function send() has to be executed. Otherwise (if not executed) the destructor will send the data. This class is DEPRECATED. New code should use class socketstream (see "socketstream.hpp").
Definition at line 28 of file osockstream.hpp.
mfem::osockstream::osockstream | ( | int | port, |
const char * | hostname | ||
) |
The constructor takes as input the name of the server and the port number through which the communication will take place.
Definition at line 17 of file osockstream.cpp.
|
inlinevirtual |
Virtual destructor. If the data hasn't been sent it sends it.
Definition at line 42 of file osockstream.hpp.
|
inline |
Send the current in the stream data to the server specified by name "hostname" (in the constructor) on port number "port". Return -1 if data has already been sent or 0 for success.
Definition at line 39 of file osockstream.hpp.