summaryrefslogtreecommitdiffstats
path: root/socket_channel.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2017-11-30 13:11:43 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2017-12-05 16:33:59 -0800
commit70fd29cf487ceefd21af58bab988a7ff9ec07efb (patch)
tree384f140fd16aef4deb78236bd924afce04f98cc0 /socket_channel.cpp
parent2207f51cbdd3962b1e94fb8432edfc2e294fd9c7 (diff)
downloadphosphor-net-ipmid-70fd29cf487ceefd21af58bab988a7ff9ec07efb.tar.gz
phosphor-net-ipmid-70fd29cf487ceefd21af58bab988a7ff9ec07efb.zip
explicit use of std::vector instead of buffer/Buffer
There were several scoped 'using buffer = std::vector<uint8_t>;' in header files. This consolidates the code base to use std::vector<uint8_t> instead of buffer or Buffer. This makes the code easier to read and debug. Change-Id: I918a0f6ca9b8e4b9d331175dccff45cbf4c8379d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'socket_channel.cpp')
-rw-r--r--socket_channel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/socket_channel.cpp b/socket_channel.cpp
index e77c6cf..8414f51 100644
--- a/socket_channel.cpp
+++ b/socket_channel.cpp
@@ -19,12 +19,12 @@ std::string Channel::getRemoteAddress() const
return std::string(tmp);
}
-std::tuple<int, buffer> Channel::read()
+std::tuple<int, std::vector<uint8_t>> Channel::read()
{
int rc = 0;
int readSize = 0;
ssize_t readDataLen = 0;
- buffer outBuffer(0);
+ std::vector<uint8_t> outBuffer(0);
if (ioctl(sockfd, FIONREAD, &readSize) < 0)
{
@@ -70,7 +70,7 @@ std::tuple<int, buffer> Channel::read()
return std::make_tuple(rc, std::move(outBuffer));
}
-int Channel::write(buffer& inBuffer)
+int Channel::write(const std::vector<uint8_t>& inBuffer)
{
int rc = 0;
auto outputPtr = inBuffer.data();
OpenPOWER on IntegriCloud