summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/tcp_connection.cc
Commit message (Collapse)AuthorAgeFilesLines
* gr-blocks: remove pdu blocksJacob Gilbert2021-03-181-101/+0
| | | | | | | | | | | | | | | | | | | | | | | | The following have been moved to the new gr::pdu module or to gr::network and are no longer needed in gr::blocks: - pdu (noblock) - pdu_filter block - pdu_remove block - pdu_set block - pdu_to_tagged_stream block - random_pdu block - socket_pdu block - stream_pdu_base (noblock) - tagged_stream_to_pdu block - tcp_connection (noblock) - tuntap_pdu block The digital and FEC modules had a large number of references to the PDU blocks that were moved from gr-blocks to gr-pdu, this updates these changes in example flowgraphs and a few python files. The usage-manual update will be propagated to the wiki so that future exports will remain up to date. Signed-off-by: Jacob Gilbert <jacob.gilbert@protonmail.com>
* blocks/tcp_connection: Move vector size to initializerThomas Habets2020-08-141-2/+1
|
* blocks/tcp_connection: Remove manual memory managementThomas Habets2020-08-141-8/+4
|
* Switch from boost pointers to std C++11 pointersThomas Habets2020-04-011-1/+1
| | | | | | | | | | | | | | | | | | | Most of this code is automated code changes: ``` set -e SUB="s/dummy/dummy/" for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do SUB="$SUB;s/boost::$i/std::$i/g" done SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g" SUB="$SUB;s^namespace boost^namespace std^g" find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB" ``` Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add `#include <algorithm>`.
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* Tree: clang-format without the include sortingMarcus Müller2019-08-091-59/+66
|
* blocks: avoid potential static initialization order fiascoMarcus Müller2018-03-301-1/+1
|
* blocks: don't pmt::mp("string") for every single PDUMarcus Müller2018-02-231-1/+1
| | | | | | | | | Replaced the usage of `#define PDU_PORT_ID pmt::mp("pdus")` – that was the actual way to *enforce* rehashing on every single use. Now, static const member of namespace `gr::blocks::pdu` as `s_pdu_port_id`. Should speed up the PDU blocks a bit. Removes run-time malloc'ing. Good thing.
* socket_pdu_impl: garbage collect closed tcp_connectionsJeff Long2018-02-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This patch addresses two problems. First tcp_connections were not being closed, leading to a bug report about socket exhaustion [1]. Second, socket_pdu_impl tracks tcp_connections in a vector so that it can broadcast outgoing data to clients. Items in this vector were never freed. This patch does a shutdown and close on the tcp_connection when there is a read failure (signaling a socket close). On each new accept, the tcp_connection list in socket_pdu_impl is scanned for closed connections, which are then removed. Possible improvements: - Make sure the read error is eof. - Check sends as well as reads. More direct signalling could be done between tcp_connection and socket_pdu_impl, but that would require an API change. No change is required, here. [1] https://github.com/gnuradio/gnuradio/issues/1568
* Swap new/delete memory management with boost::shared_ptrBrian Orr2017-08-161-5/+4
|
* Fix invalid Asio buffer usage in tcp_connectionBrian Orr2017-08-091-7/+16
| | | | | | | | | Asio requires that the underlying buffer passed to `async_write()` remain valid valid until the handler was called. The previous version was allocating a vector on the stack which gets destroyed once the `send()` method returns. Added a unit test for TCP server.
* blocks: fix incorrect use of items/bytes in PDU handlingJacob Gilbert2016-02-081-1/+1
| | | | | | | | | | | For a uniform vector, calls to pmt::length return the number of items in in the vector. However, in some places this was being treated as a byte value, resulting in short writes and other misinterpretations. These calls have been replaced with calls to pmt::blob_length, to unambiguously get the length in bytes, then converted if necessary to item values.
* Removing trailing/extra whitespaces before release.Tom Rondeau2014-07-071-1/+1
| | | | We should be more careful about letting these into the code in the future. In emacs, we can use (add-hook 'before-save-hook 'delete-trailing-whitespace).
* blocks: added 'MTU' (buffer size) & 'no_delay' params to 'tcp_connection' ↵Balint Seeber2014-03-271-18/+32
| | | | (no longer uses fixed buffer)
* runtime: converting runtime core to gr namespace, gnuradio include dir.Tom Rondeau2013-04-291-3/+3
|
* blocks: added gr::blocks::random_pduJohnathan Corgan2013-02-281-3/+1
|
* Merge branch 'master' into nextJohnathan Corgan2013-02-281-4/+4
| | | | | Conflicts: gr-blocks/lib/stream_pdu_base.cc
* blocks: added gr::blocks::socket_pduJohnathan Corgan2013-02-281-0/+87