Hi,
Got a question regarding the use of sockets in C++ with streams...
I have attempted the following:
1. established a socket by call socket() and connect() (to an echo port,
BTW).
2. used the file descriptor returned by socket() to create an instance of
ifstream and an instance of ofstream.
3. sent something to the ofstream, and received the same stuff on ifstream.
so far so good...
but when I tried using only a single fstream object, I couldn't receive the
echoed stuff.
So my questions are:
1. is it possible to use a single fstream to gain access to an opened
socket?
2. is this approach workable? I figured that specific socket operations can
be accomplished by calling C functions to fine-tune...
BTW, I tried this on Digital Unix 3.2c.
Thanks in advance.