summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/socket_pdu_impl.h
diff options
context:
space:
mode:
authorBalint Seeber <balint@ettus.com>2014-03-27 01:27:33 -0700
committerBalint Seeber <balint@ettus.com>2014-03-27 11:33:38 -0700
commit8b8d7ee57ce4029411cde48810e2ec6eac7ae5f2 (patch)
tree5bfa18d6edd9b6ef65403e0a69890326620f8f1d /gr-blocks/lib/socket_pdu_impl.h
parent1092e685defd10692d3fa47435c716a88dfd8712 (diff)
blocks: added 'MTU' and 'tcp_no_delay' params for 'socket_pdu' (and GRC option), applied MTU (buffer size) to TCP/UDP send, separate TCP/UDP server endpoint resolvers for empty/0.0.0.0 Host param (listen on all interfaces)
Whitespace clean-up.
Diffstat (limited to 'gr-blocks/lib/socket_pdu_impl.h')
-rw-r--r--gr-blocks/lib/socket_pdu_impl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gr-blocks/lib/socket_pdu_impl.h b/gr-blocks/lib/socket_pdu_impl.h
index 3099d90e00..2d5bc33518 100644
--- a/gr-blocks/lib/socket_pdu_impl.h
+++ b/gr-blocks/lib/socket_pdu_impl.h
@@ -34,13 +34,14 @@ namespace gr {
{
private:
boost::asio::io_service d_io_service;
- boost::array<char, 10000> d_rxbuf;
+ std::vector<char> d_rxbuf;
void run_io_service() { d_io_service.run(); }
// TCP specific
boost::asio::ip::tcp::endpoint d_tcp_endpoint;
std::vector<tcp_connection::sptr> d_tcp_connections;
void handle_tcp_read(const boost::system::error_code& error, size_t bytes_transferred);
+ bool d_tcp_no_delay;
// TCP server specific
boost::shared_ptr<boost::asio::ip::tcp::acceptor> d_acceptor_tcp;
@@ -60,7 +61,7 @@ namespace gr {
void udp_send(pmt::pmt_t msg);
public:
- socket_pdu_impl(std::string type, std::string addr, std::string port, int MTU);
+ socket_pdu_impl(std::string type, std::string addr, std::string port, int MTU = 10000, bool tcp_no_delay = false);
};
} /* namespace blocks */