Sponge
CS144's user-space TCP library
tcp_receiver.cc
Go to the documentation of this file.
1 #include "tcp_receiver.hh"
2 
3 // Dummy implementation of a TCP receiver
4 
5 // For Lab 2, please replace with a real implementation that passes the
6 // automated checks run by `make check_lab2`.
7 
8 template <typename... Targs>
9 void DUMMY_CODE(Targs &&... /* unused */) {}
10 
11 using namespace std;
12 
14  DUMMY_CODE(seg);
15 }
16 
17 optional<WrappingInt32> TCPReceiver::ackno() const { return {}; }
18 
19 size_t TCPReceiver::window_size() const { return {}; }
tcp_receiver.hh
TCPReceiver::ackno
std::optional< WrappingInt32 > ackno() const
The ackno that should be sent to the peer.
Definition: tcp_receiver.cc:17
TCPReceiver::segment_received
void segment_received(const TCPSegment &seg)
handle an inbound segment
Definition: tcp_receiver.cc:13
TCPReceiver::window_size
size_t window_size() const
The window size that should be sent to the peer.
Definition: tcp_receiver.cc:19
std
DUMMY_CODE
void DUMMY_CODE(Targs &&...)
Definition: tcp_receiver.cc:9
TCPSegment
TCP segment
Definition: tcp_segment.hh:10