diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-03-15 10:21:06 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-03-15 10:21:06 +0000 |
commit | c84f4fa91021a70820bcd9480b9c3e919785e7c8 (patch) | |
tree | a1a154553845f6c27f65fabbe4eb38d23a423a13 /cpp/src/Ice/Protocol.cpp | |
parent | Fixes for bug 897. (diff) | |
download | ice-c84f4fa91021a70820bcd9480b9c3e919785e7c8.tar.bz2 ice-c84f4fa91021a70820bcd9480b9c3e919785e7c8.tar.xz ice-c84f4fa91021a70820bcd9480b9c3e919785e7c8.zip |
Added Protocol.cpp
Diffstat (limited to 'cpp/src/Ice/Protocol.cpp')
-rw-r--r-- | cpp/src/Ice/Protocol.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/cpp/src/Ice/Protocol.cpp b/cpp/src/Ice/Protocol.cpp new file mode 100644 index 00000000000..e405673ec4f --- /dev/null +++ b/cpp/src/Ice/Protocol.cpp @@ -0,0 +1,64 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Protocol.h> + +namespace IceInternal +{ + +const Ice::Byte magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' + +const Ice::Byte requestHdr[] = +{ + magic[0], + magic[1], + magic[2], + magic[3], + protocolMajor, + protocolMinor, + encodingMajor, + encodingMinor, + requestMsg, + 0, // Compression status + 0, 0, 0, 0, // Message size (placeholder) + 0, 0, 0, 0 // Request id (placeholder) +}; + +const Ice::Byte requestBatchHdr[] = +{ + magic[0], + magic[1], + magic[2], + magic[3], + protocolMajor, + protocolMinor, + encodingMajor, + encodingMinor, + requestBatchMsg, + 0, // Compression status + 0, 0, 0, 0, // Message size (place holder) + 0, 0, 0, 0 // Number of requests in batch (placeholder) +}; + +const Ice::Byte replyHdr[] = +{ + magic[0], + magic[1], + magic[2], + magic[3], + protocolMajor, + protocolMinor, + encodingMajor, + encodingMinor, + replyMsg, + 0, // Compression status + 0, 0, 0, 0 // Message size (placeholder) +}; + +} |