Fixed a few typos - test client and server samples now working with new code generation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cc b/lib/cpp/src/protocol/TBinaryProtocol.cc
index 7ad3b2b..3cd11ba 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cc
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cc
@@ -110,6 +110,20 @@
return 2;
}
+uint32_t TBinaryProtocol::writeU32(shared_ptr<TTransport> out,
+ const uint32_t u32) const {
+ uint32_t net = (uint32_t)htonl(u32);
+ out->write((uint8_t*)&net, 4);
+ return 4;
+}
+
+uint32_t TBinaryProtocol::writeI32(shared_ptr<TTransport> out,
+ const int32_t i32) const {
+ int32_t net = (int32_t)htonl(i32);
+ out->write((uint8_t*)&net, 4);
+ return 4;
+}
+
uint32_t TBinaryProtocol::writeU64(shared_ptr<TTransport> out,
const uint64_t u64) const {
uint64_t net = (uint64_t)htonll(u64);
@@ -135,10 +149,10 @@
* Reading functions
*/
-uint32_t TBinaryProtocol::readMessasgeBegin(shared_ptr<TTransport> in,
- std::string& name,
- TMessageType& messageType,
- uint32_t& seqid) const {
+uint32_t TBinaryProtocol::readMessageBegin(shared_ptr<TTransport> in,
+ std::string& name,
+ TMessageType& messageType,
+ uint32_t& seqid) const {
uint32_t result = 0;
uint8_t type;