summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbmessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/dbmessage.h')
-rw-r--r--src/mongo/db/dbmessage.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h
index 63d3aaea350..405b96c35af 100644
--- a/src/mongo/db/dbmessage.h
+++ b/src/mongo/db/dbmessage.h
@@ -35,6 +35,7 @@
#include "mongo/client/constants.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/server_options.h"
+#include "mongo/transport/session.h"
#include "mongo/util/net/abstract_message_port.h"
#include "mongo/util/net/message.h"
@@ -42,10 +43,6 @@ namespace mongo {
class OperationContext;
-namespace transport {
-class Session;
-} // namespace transport
-
/* db response format
Query or GetMore: // see struct QueryResult
@@ -363,7 +360,7 @@ public:
/**
* Finishes the reply and sends the message out to 'destination'.
*/
- void send(transport::Session* session,
+ void send(const transport::SessionHandle& session,
int queryResultFlags,
const Message& requestMsg,
int nReturned,
@@ -373,14 +370,14 @@ public:
/**
* Similar to send() but used for replying to a command.
*/
- void sendCommandReply(transport::Session* session, const Message& requestMsg);
+ void sendCommandReply(const transport::SessionHandle& session, const Message& requestMsg);
private:
BufBuilder _buffer;
};
void replyToQuery(int queryResultFlags,
- transport::Session* session,
+ const transport::SessionHandle& session,
Message& requestMsg,
const void* data,
int size,
@@ -390,7 +387,7 @@ void replyToQuery(int queryResultFlags,
/* object reply helper. */
void replyToQuery(int queryResultFlags,
- transport::Session* session,
+ const transport::SessionHandle& session,
Message& requestMsg,
const BSONObj& responseObj);