MFEM  v3.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::osockstream Class Reference

#include <osockstream.hpp>

Inheritance diagram for mfem::osockstream:
[legend]
Collaboration diagram for mfem::osockstream:
[legend]

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)
 
socketbufrdbuf ()
 
int open (const char hostname[], int port)
 
int close ()
 
bool is_open ()
 
virtual ~socketstream ()
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

virtual mfem::osockstream::~osockstream ( )
inlinevirtual

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

Definition at line 42 of file osockstream.hpp.

Member Function Documentation

int mfem::osockstream::send ( )
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.


The documentation for this class was generated from the following files: