diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-12-21 15:34:45 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-12-21 15:34:45 +0000 |
commit | 92b6831cb64513fdea84481c328fb59a394ca40d (patch) | |
tree | 789c561932c3152231ed3d978e67b3b45ec65124 /lib/server | |
parent | 8634c79096f14b787713b175956566e8d379ec9f (diff) |
Allow writing a std::string to any SocketStream.
Diffstat (limited to 'lib/server')
-rw-r--r-- | lib/server/SocketStream.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/server/SocketStream.h b/lib/server/SocketStream.h index 0a62bb38..068a4ceb 100644 --- a/lib/server/SocketStream.h +++ b/lib/server/SocketStream.h @@ -50,6 +50,11 @@ public: virtual int Read(void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite); virtual void Write(const void *pBuffer, int NBytes, int Timeout = IOStream::TimeOutInfinite); + virtual void Write(const std::string& rBuffer, + int Timeout = IOStream::TimeOutInfinite) + { + IOStream::Write(rBuffer, Timeout); + } virtual void Close(); virtual bool StreamDataLeft(); virtual bool StreamClosed(); |