3 #ifndef INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_ 4 #define INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_ 7 #ifdef NLIB_SOCKET_ENABLED 14 struct TcpInputStreamSettings {
17 TcpInputStreamSettings() : buf(NULL), buffer_size(8192) {}
22 TcpInputStream()
NLIB_NOEXCEPT : socket_(NLIB_SOCKET_INVALID), buf_(NULL), buf_size_(0),
23 buffer_holder_(NULL) {}
26 TcpInputStreamSettings settings;
27 return this->Init(sockfd, settings);
33 virtual size_t FillBuffer_(
void* p,
size_t nbytes) NLIB_NOEXCEPT
NLIB_OVERRIDE;
34 virtual bool Close_() NLIB_NOEXCEPT NLIB_OVERRIDE;
35 virtual
void* GetWorkBuffer_(
size_t* nbytes) NLIB_NOEXCEPT NLIB_OVERRIDE;
41 uint8_t* buffer_holder_;
49 #endif // INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_ #define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#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.