#include <itpp/protocol/tcp.h>
Public Member Functions | |
TCP_Receiver (int label) | |
ADD DOCUMENTATION HERE. | |
virtual | ~TCP_Receiver () |
ADD DOCUMENTATION HERE. | |
virtual void | setup () |
ADD DOCUMENTATION HERE. | |
virtual void | release (std::string trace_filename="") |
ADD DOCUMENTATION HERE. | |
itpp::Packet & | get_user_message () |
called by higher layer | |
bool | is_user_message_available () |
called by higher layer | |
virtual void | set_debug (const bool enable_debug=true) |
ADD DOCUMENTATION HERE. | |
virtual void | set_debug (bool enable_debug, bool enable_signal_debug) |
ADD DOCUMENTATION HERE. | |
virtual void | set_trace (const bool enable_trace=true) |
ADD DOCUMENTATION HERE. | |
virtual void | save_trace (std::string filename) |
ADD DOCUMENTATION HERE. | |
Public Attributes | |
Signal< itpp::Packet * > | tcp_send_ack |
ADD DOCUMENTATION HERE. | |
Slot< TCP_Receiver, itpp::Packet * > | tcp_receive |
ADD DOCUMENTATION HERE. | |
Signal< int > | tcp_new_data |
indicate new data to higher layer | |
Slot< TCP_Receiver, std::string > | tcp_release |
ADD DOCUMENTATION HERE. | |
The TCP receiver models the receiver side of a TCP connection. It is connected to the network via ports "input" and "ackoutput" and to an entity modelling higher layers (e.g. a sink) via port "output".
Incoming TCP messages are used to update the receiver buffer and as a trigger to send an ACK message back to the TCP sender. If the "DelayedACK" option is used ACKs are only sent for every second packet (unless in the case of out of order packets). If the received packet is not out of order (i.e. the next expected sequence number in the byte stream has increased) new data is delivered to the higher layer. This delivery may be delayed in the receiver itself (user block processing delay) or by the subsequent entity if it blocks on incoming message indications.
A couple of parameters can be specified in the input file including delayed ACK timer value and timer granularity. The value of MSS should be equal to the one specified at the receiver side although it is only required for delayed ACK and receiver SWSA algorithms.
Like the TCP sender TTCPReceiver provides a simplified connection control via methods Setup and Release. Those methods are only used to reset internal state variables. No control messages are sent over the network, i.e. the receiver assumes that the corresponding methods at the sender side are called as well.
Generated on Sat Jul 6 2013 10:54:34 for IT++ by Doxygen 1.8.2