16 #ifndef INCLUDE_NN_NLIB_TCPOUTPUTSTREAM_H_ 17 #define INCLUDE_NN_NLIB_TCPOUTPUTSTREAM_H_ 20 #ifdef NLIB_SOCKET_ENABLED 27 struct TcpOutputStreamSettings {
30 TcpOutputStreamSettings() : buf(NULL), buffer_size(8192) {}
35 TcpOutputStream()
NLIB_NOEXCEPT : socket_(NLIB_SOCKET_INVALID), buf_(NULL), buf_size_(0),
36 buffer_holder_(NULL) {}
39 TcpOutputStreamSettings settings;
40 return this->Init(sockfd, settings);
45 virtual bool PushBuffer_(
const void* p,
size_t nbytes,
47 virtual bool Close_() NLIB_NOEXCEPT NLIB_OVERRIDE;
53 uint8_t* buffer_holder_;
59 #endif // INCLUDE_NN_NLIB_TCPOUTPUTSTREAM_H_ #define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
A file that contains the configuration information for each development environment.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
Defines the base class for output streams.