26 #include "ns3/socket.h"
27 #include "ns3/traced-callback.h"
28 #include "ns3/callback.h"
30 #include "ns3/object.h"
31 #include "ns3/nstime.h"
A low-level Socket API based loosely on the BSD Socket API.
(abstract) base class of all TcpSockets
virtual void SetInitialSSThresh(uint32_t threshold)=0
Set the initial Slow Start Threshold.
virtual bool GetTcpNoDelay(void) const =0
Check if Nagle's algorithm is enabled or not.
virtual void SetRcvBufSize(uint32_t size)=0
Set the receive buffer size.
static const char *const TcpStateName[TcpSocket::LAST_STATE]
Literal names of TCP states for use in log messages.
virtual Time GetPersistTimeout(void) const =0
Get the timeout for persistent connection.
static TypeId GetTypeId(void)
Get the type ID.
virtual void SetDelAckMaxCount(uint32_t count)=0
Set the number of packet to fire an ACK before delay timeout.
virtual uint32_t GetDataRetries(void) const =0
Get the number of data transmission retries before giving up.
virtual void SetPersistTimeout(Time timeout)=0
Set the timeout for persistent connection.
virtual uint32_t GetInitialSSThresh(void) const =0
Get the initial Slow Start Threshold.
virtual uint32_t GetDelAckMaxCount(void) const =0
Get the number of packet to fire an ACK before delay timeout.
virtual uint32_t GetSynRetries(void) const =0
Get the number of connection retries before giving up.
virtual uint32_t GetSegSize(void) const =0
Get the segment size.
virtual void SetSegSize(uint32_t size)=0
Set the segment size.
virtual uint32_t GetSndBufSize(void) const =0
Get the send buffer size.
virtual uint32_t GetRcvBufSize(void) const =0
Get the receive buffer size.
virtual void SetSndBufSize(uint32_t size)=0
Set the send buffer size.
virtual Time GetConnTimeout(void) const =0
Get the connection timeout.
virtual void SetDataRetries(uint32_t retries)=0
Set the number of data transmission retries before giving up.
virtual void SetDelAckTimeout(Time timeout)=0
Set the time to delay an ACK.
virtual void SetConnTimeout(Time timeout)=0
Set the connection timeout.
virtual void SetTcpNoDelay(bool noDelay)=0
Enable/Disable Nagle's algorithm.
virtual Time GetDelAckTimeout(void) const =0
Get the time to delay an ACK.
virtual uint32_t GetInitialCwnd(void) const =0
Get the initial Congestion Window.
virtual void SetInitialCwnd(uint32_t cwnd)=0
Set the initial Congestion Window.
virtual void SetSynRetries(uint32_t count)=0
Set the number of connection retries before giving up.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TcpStates_t
Names of the 11 TCP states.
void(* TcpStatesTracedValueCallback)(const TcpSocket::TcpStates_t oldValue, const TcpSocket::TcpStates_t newValue)
TracedValue Callback signature for TcpStates_t.
@ ESTABLISHED
Connection established
@ FIN_WAIT_2
All buffered data sent, waiting for remote to shutdown.
@ LISTEN
Listening for a connection
@ LAST_STATE
Last state, used only in debug messages
@ CLOSE_WAIT
Remote side has shutdown and is waiting for us to finish writing our data and to shutdown (we have to...
@ SYN_SENT
Sent a connection request, waiting for ack
@ CLOSED
Socket is finished
@ FIN_WAIT_1
Our side has shutdown, waiting to complete transmission of remaining buffered data
@ TIME_WAIT
Timeout to catch resent junk before entering closed, can only be entered from FIN_WAIT2 or CLOSING.
@ SYN_RCVD
Received a connection request, sent ack, waiting for final ack in three-way handshake.
@ LAST_ACK
Our side has shutdown after remote has shutdown.
@ CLOSING
Both sides have shutdown but we still have data we have to finish sending
Every class exported by the ns3 library is enclosed in the ns3 namespace.