Poco::Net

class SocketStreamBuf

File Information

Library: Net
Package: Sockets
Header: Poco/Net/SocketStream.h

Description

This is the streambuf class used for reading from and writing to a socket.

Inheritance

Direct Base Classes: Poco::BufferedBidirectionalStreamBuf

All Base Classes: Poco::BufferedBidirectionalStreamBuf

Member Summary

Member Functions: readFromDevice, socketImpl, writeToDevice

Constructors

SocketStreamBuf

SocketStreamBuf(
    const Socket & socket
);

Creates a SocketStreamBuf with the given socket.

The socket's SocketImpl must be a StreamSocketImpl, otherwise an InvalidArgumentException is thrown.

Destructor

~SocketStreamBuf

~SocketStreamBuf();

Destroys the SocketStreamBuf.

Member Functions

socketImpl inline

StreamSocketImpl * socketImpl() const;

Returns the internal SocketImpl.

readFromDevice protected

int readFromDevice(
    char * buffer,
    std::streamsize length
);

writeToDevice protected

int writeToDevice(
    const char * buffer,
    std::streamsize length
);

Securely control IoT edge devices from anywhere   Connect a Device