MFEM v2.0
Public Member Functions
osockstream Class Reference

#include <osockstream.hpp>

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

List of all members.

Public Member Functions

 osockstream (int port, const char *hostname)
int send ()
virtual ~osockstream ()

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 26 of file osockstream.hpp.


Constructor & Destructor Documentation

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 14 of file osockstream.cpp.

References socketstream::is_open().

virtual osockstream::~osockstream ( ) [inline, virtual]

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

Definition at line 40 of file osockstream.hpp.


Member Function Documentation

int 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 37 of file osockstream.hpp.

Referenced by main().


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