8 #ifndef WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_ 9 #define WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_ 13 #include "llvm/StringRef.h" 23 kConnectionClosed = 0,
24 kConnectionReset = -1,
25 kConnectionTimedOut = -2,
29 virtual std::size_t send(
const char* buffer, std::size_t len, Error* err) = 0;
30 virtual std::size_t receive(
char* buffer, std::size_t len, Error* err,
32 virtual void close() = 0;
35 virtual int getPeerPort()
const = 0;
36 virtual void setNoDelay() = 0;
39 virtual bool setBlocking(
bool enabled) = 0;
40 virtual int getNativeHandle()
const = 0;
48 #endif // WPIUTIL_TCPSOCKETS_NETWORKSTREAM_H_ Definition: NetworkStream.h:17
Definition: SocketError.cpp:18
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42