summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbmessage.h
diff options
context:
space:
mode:
authorSamantha Ritter <samantha.ritter@10gen.com>2016-05-31 14:05:17 -0400
committerJason Carey <jcarey@argv.me>2016-07-12 18:38:37 -0400
commitc263ce1f95586f8652058e6202015a77f9becc49 (patch)
treed623fb9da9fd5da3cc4e20cac0653f1fa4af00eb /src/mongo/db/dbmessage.h
parentdead3cf8b4b3cb5528ad1abb9eeb722b395e3632 (diff)
downloadmongo-c263ce1f95586f8652058e6202015a77f9becc49.tar.gz
SERVER-24162 Integrate TransportLayer
Expand the transport layer as needed to replace uses of abstract message port for ingress networking.
Diffstat (limited to 'src/mongo/db/dbmessage.h')
-rw-r--r--src/mongo/db/dbmessage.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h
index 7f1a3a2d0f2..7fabf117421 100644
--- a/src/mongo/db/dbmessage.h
+++ b/src/mongo/db/dbmessage.h
@@ -39,6 +39,12 @@
namespace mongo {
+class OperationContext;
+
+namespace transport {
+class Session;
+} // namespace transport
+
/* db response format
Query or GetMore: // see struct QueryResult
@@ -352,9 +358,9 @@ public:
/**
* Finishes the reply and sends the message out to 'destination'.
*/
- void send(AbstractMessagingPort* destination,
+ void send(transport::Session* session,
int queryResultFlags,
- Message& requestMsg, // should be const but MessagePort::reply takes non-const.
+ const Message& requestMsg,
int nReturned,
int startingFrom = 0,
long long cursorId = 0);
@@ -362,14 +368,14 @@ public:
/**
* Similar to send() but used for replying to a command.
*/
- void sendCommandReply(AbstractMessagingPort* destination, Message& requestMsg);
+ void sendCommandReply(transport::Session* session, const Message& requestMsg);
private:
BufBuilder _buffer;
};
void replyToQuery(int queryResultFlags,
- AbstractMessagingPort* p,
+ transport::Session* session,
Message& requestMsg,
const void* data,
int size,
@@ -377,10 +383,9 @@ void replyToQuery(int queryResultFlags,
int startingFrom = 0,
long long cursorId = 0);
-
/* object reply helper. */
void replyToQuery(int queryResultFlags,
- AbstractMessagingPort* p,
+ transport::Session* session,
Message& requestMsg,
const BSONObj& responseObj);