Library: Net
Package: Sockets
Header: Poco/Net/SocketStream.h
This is the streambuf class used for reading from and writing to a socket.
Direct Base Classes: Poco::BufferedBidirectionalStreamBuf
All Base Classes: Poco::BufferedBidirectionalStreamBuf
Known Derived Classes: Poco::Remoting::Binary::BinaryStreamBuf
Member Functions: readFromDevice, socketImpl, writeToDevice
SocketStreamBuf(
const Socket & socket
);
Creates a SocketStreamBuf with the given socket.
The socket's SocketImpl must be a StreamSocketImpl, otherwise an InvalidArgumentException is thrown.
~SocketStreamBuf();
Destroys the SocketStreamBuf.
StreamSocketImpl * socketImpl() const;
Returns the internal SocketImpl.
int readFromDevice(
char * buffer,
std::streamsize length
);
int writeToDevice(
const char * buffer,
std::streamsize length
);