8 #ifndef TCPSOCKETS_NETWORKSTREAM_H_
9 #define TCPSOCKETS_NETWORKSTREAM_H_
13 #include "llvm/StringRef.h"
21 kConnectionClosed = 0,
22 kConnectionReset = -1,
23 kConnectionTimedOut = -2
26 virtual std::size_t send(
const char* buffer, std::size_t len,
Error* err) = 0;
27 virtual std::size_t receive(
char* buffer, std::size_t len,
Error* err,
29 virtual void close() = 0;
32 virtual int getPeerPort()
const = 0;
33 virtual void setNoDelay() = 0;
39 #endif // TCPSOCKETS_NETWORKSTREAM_H_
Definition: NetworkStream.h:15
Error object represents a library error.
Definition: Error.h:28
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:39