summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-08-16 22:47:04 +0000
committerMark Spruiell <mes@zeroc.com>2006-08-16 22:47:04 +0000
commit9fbd34278bda7d84f9773869d0ba4308ec156253 (patch)
treed988a7d329ac2643b858a7f9f01131c83992f2cc /cpp/src
parentstarted the 'two threads per connection' (diff)
downloadice-9fbd34278bda7d84f9773869d0ba4308ec156253.tar.bz2
ice-9fbd34278bda7d84f9773869d0ba4308ec156253.tar.xz
ice-9fbd34278bda7d84f9773869d0ba4308ec156253.zip
adding zero-copy functions for sequence<byte>
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/StreamI.cpp12
-rw-r--r--cpp/src/Ice/StreamI.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp
index 05cb4c44c3a..83e9dc5c226 100644
--- a/cpp/src/Ice/StreamI.cpp
+++ b/cpp/src/Ice/StreamI.cpp
@@ -88,6 +88,12 @@ Ice::InputStreamI::readByteSeq()
return v;
}
+void
+Ice::InputStreamI::readByteSeq(pair<const Byte*, const Byte*>& p)
+{
+ _is.read(p);
+}
+
Short
Ice::InputStreamI::readShort()
{
@@ -331,6 +337,12 @@ Ice::OutputStreamI::writeByteSeq(const vector<Byte>& v)
}
void
+Ice::OutputStreamI::writeByteSeq(const Byte* begin, const Byte* end)
+{
+ _os.write(begin, end);
+}
+
+void
Ice::OutputStreamI::writeShort(Short v)
{
_os.write(v);
diff --git a/cpp/src/Ice/StreamI.h b/cpp/src/Ice/StreamI.h
index 971f3072335..701442617b8 100644
--- a/cpp/src/Ice/StreamI.h
+++ b/cpp/src/Ice/StreamI.h
@@ -65,6 +65,7 @@ public:
virtual ::Ice::Byte readByte();
virtual ::std::vector< ::Ice::Byte > readByteSeq();
+ virtual void readByteSeq(::std::pair<const ::Ice::Byte*, const ::Ice::Byte*>&);
virtual ::Ice::Short readShort();
virtual ::std::vector< ::Ice::Short > readShortSeq();
@@ -131,6 +132,7 @@ public:
virtual void writeByte(::Ice::Byte);
virtual void writeByteSeq(const ::std::vector< ::Ice::Byte >&);
+ virtual void writeByteSeq(const Ice::Byte*, const Ice::Byte*);
virtual void writeShort(::Ice::Short);
virtual void writeShortSeq(const ::std::vector< ::Ice::Short >&);