From 8f4cc27e39188d302f6575e7324002e2515fd789 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 25 Sep 2014 20:46:50 +0200 Subject: Added cByteBuffer::WriteBEUShort(). --- src/ByteBuffer.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/ByteBuffer.cpp') diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index 17e8091c7..5bf98eda9 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -547,6 +547,19 @@ bool cByteBuffer::WriteBEShort(short a_Value) +bool cByteBuffer::WriteBEUShort(unsigned short a_Value) +{ + CHECK_THREAD; + CheckValid(); + PUTBYTES(2); + u_short Converted = htons((u_short)a_Value); + return WriteBuf(&Converted, 2); +} + + + + + bool cByteBuffer::WriteBEInt(int a_Value) { CHECK_THREAD; -- cgit v1.2.3