MFEM
v4.2.0
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 (bool secure=secure_default) | |
Create a socket stream without connecting to a host. More... | |
socketstream (socketbuf *buf) | |
Create a socket stream associated with the given socket buffer. The new object takes ownership of 'buf'. More... | |
socketstream (int s, bool secure=secure_default) | |
Create a socket stream and associate it with the given socket descriptor 's'. The treatment of the 'secure' flag is similar to that in the default constructor. More... | |
socketstream (const char hostname[], int port, bool secure=secure_default) | |
Create a socket stream and connect to the given host and port. The treatment of the 'secure' flag is similar to that in the default constructor. More... | |
socketstream (const GnuTLS_session_params &p) | |
Create a secure socket stream using the given GnuTLS_session_params. More... | |
socketbuf * | rdbuf () |
int | open (const char hostname[], int port) |
Open the socket stream on 'port' at 'hostname'. More... | |
int | close () |
Close the socketstream. More... | |
bool | is_open () |
True if the socketstream is open, false otherwise. More... | |
virtual | ~socketstream () |
Additional Inherited Members | |
Static Public Attributes inherited from mfem::socketstream | |
static const bool | secure_default = true |
Protected Member Functions inherited from mfem::socketstream | |
void | set_socket (bool secure) |
void | check_secure_socket () |
void | set_secure_socket (const GnuTLS_session_params &p) |
Static Protected Member Functions inherited from mfem::socketstream | |
static GnuTLS_session_params & | add_socket () |
static void | remove_socket () |
Protected Attributes inherited from mfem::socketstream | |
socketbuf * | buf__ |
bool | glvis_client |
Static Protected Attributes inherited from mfem::socketstream | |
static int | num_glvis_sockets = 0 |
static GnuTLS_global_state * | state = NULL |
static GnuTLS_session_params * | params = NULL |
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.
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 18 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.