5#ifndef WPINET_NETWORKSTREAM_H_
6#define WPINET_NETWORKSTREAM_H_
25 virtual size_t send(
const char* buffer,
size_t len,
Error* err) = 0;
Definition: NetworkStream.h:13
virtual int getNativeHandle() const =0
virtual void setNoDelay()=0
virtual bool setBlocking(bool enabled)=0
virtual std::string_view getPeerIP() const =0
NetworkStream(const NetworkStream &)=delete
NetworkStream & operator=(const NetworkStream &)=delete
virtual size_t send(const char *buffer, size_t len, Error *err)=0
Error
Definition: NetworkStream.h:18
@ kConnectionTimedOut
Definition: NetworkStream.h:21
@ kWouldBlock
Definition: NetworkStream.h:22
@ kConnectionReset
Definition: NetworkStream.h:20
@ kConnectionClosed
Definition: NetworkStream.h:19
virtual ~NetworkStream()=default
virtual size_t receive(char *buffer, size_t len, Error *err, int timeout=0)=0
virtual int getPeerPort() const =0
basic_string_view< char > string_view
Definition: core.h:501
Definition: ntcore_cpp.h:26