3 #ifndef INCLUDE_NN_NLIB_TCPOUTPUTSTREAM_H_ 4 #define INCLUDE_NN_NLIB_TCPOUTPUTSTREAM_H_ 7 #ifdef NLIB_SOCKET_ENABLED 14 struct TcpOutputStreamSettings {
17 TcpOutputStreamSettings() : buf(NULL), buffer_size(8192) {}
22 TcpOutputStream()
NLIB_NOEXCEPT : socket_(NLIB_SOCKET_INVALID), buf_(NULL), buf_size_(0),
23 buffer_holder_(NULL) {}
26 TcpOutputStreamSettings settings;
27 return this->Init(sockfd, settings);
32 virtual bool PushBuffer_(
const void* p,
size_t nbytes,
34 virtual bool Close_() NLIB_NOEXCEPT NLIB_OVERRIDE;
40 uint8_t* buffer_holder_;
46 #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.