3 #ifndef INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_
4 #define INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_
7 #ifdef NLIB_SOCKET_ENABLED
15 struct TcpInputStreamSettings {
18 TcpInputStreamSettings() : buf(NULL), buffer_size(8192) {}
21 #if defined(NLIB_WINDLL) && defined(NLIB_CXX11_UNIQUEPTR) && defined(NLIB_CXX11_TEMPLATE_ALIAS)
22 # ifdef nx_misc_EXPORTS
23 template class __declspec(dllexport)
std::unique_ptr<uint8_t[]>;
25 extern template class __declspec(dllimport)
std::unique_ptr<uint8_t[]>;
30 class TcpInputStream
NLIB_FINAL :
public InputStream {
36 TcpInputStream()
NLIB_NOEXCEPT : m_Socket(NLIB_SOCKET_INVALID), m_Buf(NULL), m_BufSize(0) {}
39 TcpInputStreamSettings settings;
40 return this->Init(sockfd, settings);
49 NLIB_VIS_PUBLIC virtual
void* GetWorkBuffer_(
size_t* nBytes) NLIB_NOEXCEPT NLIB_OVERRIDE;
55 UniquePtr<uint8_t[]> m_BufferHolder;
63 #endif // INCLUDE_NN_NLIB_TCPINPUTSTREAM_H_
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_FINAL
Defines final 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_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
Defines that class that is corresponding to std::unique_ptr.
A file that contains the configuration information for each development environment.