diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2018-02-20 14:33:42 -0500 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2018-03-02 11:07:01 -0500 |
commit | b2d8bd06318e1fddf4f1579084bbda4fb556c176 (patch) | |
tree | f591c41a0100dc85b51177396e80b946822aa712 /src/mongo/transport/session.h | |
parent | 975d539ae068bd27ebb478b6f3673b89d2ad6beb (diff) | |
download | mongo-b2d8bd06318e1fddf4f1579084bbda4fb556c176.tar.gz |
SERVER-33300 Integrate TransportLayer with DBClient
Diffstat (limited to 'src/mongo/transport/session.h')
-rw-r--r-- | src/mongo/transport/session.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/transport/session.h b/src/mongo/transport/session.h index db80aa0814d..c9438269ec7 100644 --- a/src/mongo/transport/session.h +++ b/src/mongo/transport/session.h @@ -122,6 +122,16 @@ public: */ virtual void setTimeout(boost::optional<Milliseconds> timeout) = 0; + /** + * This will return whether calling sourceMessage()/sinkMessage() will fail with an EOF error. + * + * Implementations may actually perform some I/O or call syscalls to determine this, rather + * than just checking a flag. + * + * This must not be called while the session is currently sourcing or sinking a message. + */ + virtual bool isConnected() = 0; + virtual const HostAndPort& remote() const = 0; virtual const HostAndPort& local() const = 0; |