summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/net/message.cpp')
-rw-r--r--src/mongo/util/net/message.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/mongo/util/net/message.cpp b/src/mongo/util/net/message.cpp
index 515efc9c853..9c91ce0d124 100644
--- a/src/mongo/util/net/message.cpp
+++ b/src/mongo/util/net/message.cpp
@@ -36,29 +36,12 @@
#include <time.h>
#include "mongo/util/net/listen.h"
-#include "mongo/util/net/message_port.h"
namespace mongo {
-void Message::send(MessagingPort& p, const char* context) {
- if (empty()) {
- return;
- }
- if (_buf != 0) {
- p.send(_buf, MsgData::ConstView(_buf).getLen(), context);
- } else {
- p.send(_data, context);
- }
-}
-
+namespace {
AtomicWord<int32_t> NextMsgId;
-
-/*struct MsgStart {
- MsgStart() {
- NextMsgId = (((unsigned) time(0)) << 16) ^ curTimeMillis();
- verify(MsgDataHeaderSize == 16);
- }
-} msgstart;*/
+} // namespace
int32_t nextMessageId() {
return NextMsgId.fetchAndAdd(1);