diff options
Diffstat (limited to 'host/lib/transport/udp_simple.cpp')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index e10dff7f8..c83e72d03 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -44,14 +44,14 @@ public: _socket->connect(_send_endpoint); } - size_t send(const asio::const_buffer& buff) + size_t send(const asio::const_buffer& buff) override { if (_connected) return _socket->send(asio::buffer(buff)); return _socket->send_to(asio::buffer(buff), _send_endpoint); } - size_t recv(const asio::mutable_buffer& buff, double timeout) + size_t recv(const asio::mutable_buffer& buff, double timeout) override { const int32_t timeout_ms = static_cast<int32_t>(timeout * 1000); @@ -60,12 +60,12 @@ public: return _socket->receive_from(asio::buffer(buff), _recv_endpoint); } - std::string get_recv_addr(void) + std::string get_recv_addr(void) override { return _recv_endpoint.address().to_string(); } - std::string get_send_addr(void) + std::string get_send_addr(void) override { return _send_endpoint.address().to_string(); } @@ -113,12 +113,12 @@ public: this->write_uart(""); // send an empty packet to init } - void write_uart(const std::string& buf) + void write_uart(const std::string& buf) override { _udp->send(asio::buffer(buf)); } - std::string read_uart(double timeout) + std::string read_uart(double timeout) override { std::string line; const boost::system_time exit_time = |