TransferInterface implementation plugin that sends data using TCP sockets. More...
#include <artdaq/TransferPlugins/TCPSocketTransfer.hh>
Classes | |
struct | DestinationInfo |
Public Member Functions | |
TCPSocketTransfer (fhicl::ParameterSet const &ps, Role role) | |
TCPSocketTransfer Constructor. | |
int | receiveFragment (Fragment &frag, size_t timeout_usec=0) override |
Receive a Fragment using TCP. | |
CopyStatus | copyFragment (Fragment &frag, size_t timeout_usec) override |
Copy a Fragment to the destination. Same implementation as moveFragment, as TCP is always reliable. | |
CopyStatus | moveFragment (Fragment &&frag, size_t timeout_usec) override |
Move a Fragment to the destination. |
TransferInterface implementation plugin that sends data using TCP sockets.
Definition at line 41 of file TCPSocketTransfer.hh.
artdaq::TCPSocketTransfer::TCPSocketTransfer | ( | fhicl::ParameterSet const & | ps, | |
TransferInterface::Role | role | |||
) |
TCPSocketTransfer Constructor.
ps | ParameterSet used to configure TCPSocketTransfer | |
role | Role of this TCPSocketTransfer instance (kSend or kReceive) |
* TCPSocketTransfer accepts the following Parameters: * "tcp_receive_buffer_size" (Default: 0): The TCP buffer size on the receive socket * "host_map" (REQUIRED): List of FHiCL tables containing information about other hosts in the system. * Each table should contain: * "rank" (Default: RECV_TIMEOUT): Rank of this host * "host" (Default: "localhost"): Hostname of this host * "portOffset" (Default: 5500): To avoid collisions, each destination should specify its own port offset. * All TCPSocketTransfers sending to that destination will add their own rank to make a unique port number. *
TCPSocketTransfer also requires all Parameters for configuring a TransferInterface
Definition at line 34 of file TCPSocket_transfer.cc.
CopyStatus artdaq::TCPSocketTransfer::copyFragment | ( | Fragment & | frag, | |
size_t | timeout_usec | |||
) | [inline, override] |
Copy a Fragment to the destination. Same implementation as moveFragment, as TCP is always reliable.
frag | Fragment to copy | |
timeout_usec | Timeout for send, in microseconds |
Definition at line 79 of file TCPSocketTransfer.hh.
CopyStatus artdaq::TCPSocketTransfer::moveFragment | ( | Fragment && | frag, | |
size_t | timeout_usec | |||
) | [inline, override] |
Move a Fragment to the destination.
frag | Fragment to move | |
timeout_usec | Timeout for send, in microseconds |
Definition at line 87 of file TCPSocketTransfer.hh.
int artdaq::TCPSocketTransfer::receiveFragment | ( | Fragment & | frag, | |
size_t | timeout_usec = 0 | |||
) | [override] |
Receive a Fragment using TCP.
[out] | frag | Received Fragment |
timeout_usec | Timeout for receive, in microseconds |
Definition at line 431 of file TCPSocket_transfer.cc.