| 1 | // |
|---|---|
| 2 | // KillCursorsRequest.cpp |
| 3 | // |
| 4 | // Library: MongoDB |
| 5 | // Package: MongoDB |
| 6 | // Module: KillCursorsRequest |
| 7 | // |
| 8 | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. |
| 9 | // and Contributors. |
| 10 | // |
| 11 | // SPDX-License-Identifier: BSL-1.0 |
| 12 | // |
| 13 | |
| 14 | |
| 15 | #include "Poco/MongoDB/KillCursorsRequest.h" |
| 16 | |
| 17 | |
| 18 | namespace Poco { |
| 19 | namespace MongoDB { |
| 20 | |
| 21 | |
| 22 | KillCursorsRequest::KillCursorsRequest(): |
| 23 | RequestMessage(MessageHeader::OP_KILL_CURSORS) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | |
| 28 | KillCursorsRequest::~KillCursorsRequest() |
| 29 | { |
| 30 | } |
| 31 | |
| 32 | |
| 33 | void KillCursorsRequest::buildRequest(BinaryWriter& writer) |
| 34 | { |
| 35 | writer << 0; // 0 - reserved for future use |
| 36 | writer << static_cast<Poco::UInt64>(_cursors.size()); |
| 37 | for (std::vector<Int64>::iterator it = _cursors.begin(); it != _cursors.end(); ++it) |
| 38 | { |
| 39 | writer << *it; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | |
| 44 | } } // namespace Poco::MongoDB |
| 45 |