blob: 3cb9dc4df56fcc8cced295313a35a915d549403e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "messagesender.h"
#include <vespa/storageapi/messageapi/storagemessage.h>
#include <vespa/storageapi/messageapi/storagereply.h>
#include <vespa/storageapi/messageapi/storagecommand.h>
namespace storage {
void
MessageSender::send(const std::shared_ptr<api::StorageMessage>& msg)
{
if (msg->getType().isReply()) {
sendReply(std::static_pointer_cast<api::StorageReply>(msg));
} else {
sendCommand(std::static_pointer_cast<api::StorageCommand>(msg));
}
}
void
MessageSender::sendReplyDirectly(const std::shared_ptr<api::StorageReply>& reply) {
sendReply(reply);
}
}
|