class Poco::Net::SocketIOS
Overview
The base class for SocketStream, SocketInputStream and SocketOutputStream. More…
#include <SocketStream.h> class SocketIOS: public ios { public: // construction SocketIOS(const Socket& socket); // methods SocketStreamBuf* rdbuf(); void close(); StreamSocket socket() const; protected: // fields SocketStreamBuf _buf; }; // direct descendants class SocketInputStream; class SocketOutputStream; class SocketStream;
Detailed Documentation
The base class for SocketStream, SocketInputStream and SocketOutputStream.
This class is needed to ensure the correct initialization order of the stream buffer and base classes.
Construction
SocketIOS(const Socket& socket)
Creates the SocketIOS with the given socket.
The socket’s SocketImpl must be a StreamSocketImpl, otherwise an InvalidArgumentException is thrown.
Methods
SocketStreamBuf* rdbuf()
Returns a pointer to the internal SocketStreamBuf.
void close()
Flushes the stream and closes the socket.
StreamSocket socket() const
Returns the underlying socket.