summaryrefslogtreecommitdiff
path: root/src/mongo/db/dbmessage.h
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2016-11-04 14:45:32 -0400
committersamantharitter <samantha.ritter@10gen.com>2016-11-05 21:26:59 -0400
commit0ac04999faae1d2fc0e10972aaf21082a2e48c8f (patch)
treed9b74efcf36c5381469cc622c3aea4c0f8166398 /src/mongo/db/dbmessage.h
parent2d1dd9e07a40f314853e29bffb56b45bf21df940 (diff)
downloadmongo-0ac04999faae1d2fc0e10972aaf21082a2e48c8f.tar.gz
SERVER-26674 transport::Session objects should be shared_ptr managed
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);