A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::TcpSocket Class Referenceabstract

(abstract) base class of all TcpSockets More...

#include "tcp-socket.h"

+ Inheritance diagram for ns3::TcpSocket:
+ Collaboration diagram for ns3::TcpSocket:

Public Types

enum  TcpStates_t {
  CLOSED = 0 , LISTEN , SYN_SENT , SYN_RCVD ,
  ESTABLISHED , CLOSE_WAIT , LAST_ACK , FIN_WAIT_1 ,
  FIN_WAIT_2 , CLOSING , TIME_WAIT , LAST_STATE
}
 Names of the 11 TCP states. More...
 
- Public Types inherited from ns3::Socket
enum  Ipv6MulticastFilterMode { INCLUDE = 1 , EXCLUDE }
 Enumeration of the possible filter of a socket. More...
 
enum  SocketErrno {
  ERROR_NOTERROR , ERROR_ISCONN , ERROR_NOTCONN , ERROR_MSGSIZE ,
  ERROR_AGAIN , ERROR_SHUTDOWN , ERROR_OPNOTSUPP , ERROR_AFNOSUPPORT ,
  ERROR_INVAL , ERROR_BADF , ERROR_NOROUTETOHOST , ERROR_NODEV ,
  ERROR_ADDRNOTAVAIL , ERROR_ADDRINUSE , SOCKET_ERRNO_LAST
}
 Enumeration of the possible errors returned by a socket. More...
 
enum  SocketPriority {
  NS3_PRIO_BESTEFFORT = 0 , NS3_PRIO_FILLER = 1 , NS3_PRIO_BULK = 2 , NS3_PRIO_INTERACTIVE_BULK = 4 ,
  NS3_PRIO_INTERACTIVE = 6 , NS3_PRIO_CONTROL = 7
}
 Enumeration of the possible socket priorities. More...
 
enum  SocketType { NS3_SOCK_STREAM , NS3_SOCK_SEQPACKET , NS3_SOCK_DGRAM , NS3_SOCK_RAW }
 Enumeration of the possible socket types. More...
 

Public Member Functions

 TcpSocket ()
 
 ~TcpSocket () override
 
- Public Member Functions inherited from ns3::Socket
 Socket ()
 
 ~Socket () override
 
virtual int Bind ()=0
 Allocate a local IPv4 endpoint for this socket.
 
virtual int Bind (const Address &address)=0
 Allocate a local endpoint for this socket.
 
virtual int Bind6 ()=0
 Allocate a local IPv6 endpoint for this socket.
 
virtual void BindToNetDevice (Ptr< NetDevice > netdevice)
 Bind a socket to specific device.
 
virtual int Close ()=0
 Close a socket.
 
virtual int Connect (const Address &address)=0
 Initiate a connection to a remote host.
 
virtual bool GetAllowBroadcast () const =0
 Query whether broadcast datagram transmissions are allowed.
 
Ptr< NetDeviceGetBoundNetDevice ()
 Returns socket's bound NetDevice, if any.
 
virtual Socket::SocketErrno GetErrno () const =0
 Get last error number.
 
uint8_t GetIpTos () const
 Query the value of IP Type of Service of this socket.
 
virtual uint8_t GetIpTtl () const
 Query the value of IP Time to Live field of this socket.
 
virtual uint8_t GetIpv6HopLimit () const
 Query the value of IP Hop Limit field of this socket.
 
uint8_t GetIpv6Tclass () const
 Query the value of IPv6 Traffic Class field of this socket.
 
virtual Ptr< NodeGetNode () const =0
 Return the node this socket is associated with.
 
virtual int GetPeerName (Address &address) const =0
 Get the peer address of a connected socket.
 
uint8_t GetPriority () const
 Query the priority value of this socket.
 
virtual uint32_t GetRxAvailable () const =0
 Return number of bytes which can be returned from one or multiple calls to Recv.
 
virtual Socket::SocketType GetSocketType () const =0
 
virtual int GetSockName (Address &address) const =0
 Get socket address.
 
virtual uint32_t GetTxAvailable () const =0
 Returns the number of bytes which can be sent in a single call to Send.
 
virtual void Ipv6JoinGroup (Ipv6Address address)
 Joins a IPv6 multicast group without filters.
 
virtual void Ipv6JoinGroup (Ipv6Address address, Ipv6MulticastFilterMode filterMode, std::vector< Ipv6Address > sourceAddresses)
 Joins a IPv6 multicast group.
 
virtual void Ipv6LeaveGroup ()
 Leaves IPv6 multicast group this socket is joined to.
 
bool IsIpRecvTos () const
 Ask if the socket is currently passing information about IP Type of Service up the stack.
 
bool IsIpRecvTtl () const
 Ask if the socket is currently passing information about IP_TTL up the stack.
 
bool IsIpv6RecvHopLimit () const
 Ask if the socket is currently passing information about IPv6 Hop Limit up the stack.
 
bool IsIpv6RecvTclass () const
 Ask if the socket is currently passing information about IPv6 Traffic Class up the stack.
 
bool IsRecvPktInfo () const
 Get status indicating whether enable/disable packet information to socket.
 
virtual int Listen ()=0
 Listen for incoming connections.
 
Ptr< PacketRecv ()
 Read a single packet from the socket.
 
virtual Ptr< PacketRecv (uint32_t maxSize, uint32_t flags)=0
 Read data from the socket.
 
int Recv (uint8_t *buf, uint32_t size, uint32_t flags)
 Recv data (or dummy data) from the remote host.
 
Ptr< PacketRecvFrom (Address &fromAddress)
 Read a single packet from the socket and retrieve the sender address.
 
virtual Ptr< PacketRecvFrom (uint32_t maxSize, uint32_t flags, Address &fromAddress)=0
 Read a single packet from the socket and retrieve the sender address.
 
int RecvFrom (uint8_t *buf, uint32_t size, uint32_t flags, Address &fromAddress)
 Read a single packet from the socket and retrieve the sender address.
 
int Send (const uint8_t *buf, uint32_t size, uint32_t flags)
 Send data (or dummy data) to the remote host.
 
int Send (Ptr< Packet > p)
 Send data (or dummy data) to the remote host.
 
virtual int Send (Ptr< Packet > p, uint32_t flags)=0
 Send data (or dummy data) to the remote host.
 
int SendTo (const uint8_t *buf, uint32_t size, uint32_t flags, const Address &address)
 Send data to a specified peer.
 
virtual int SendTo (Ptr< Packet > p, uint32_t flags, const Address &toAddress)=0
 Send data to a specified peer.
 
void SetAcceptCallback (Callback< bool, Ptr< Socket >, const Address & > connectionRequest, Callback< void, Ptr< Socket >, const Address & > newConnectionCreated)
 Accept connection requests from remote hosts.
 
virtual bool SetAllowBroadcast (bool allowBroadcast)=0
 Configure whether broadcast datagram transmissions are allowed.
 
void SetCloseCallbacks (Callback< void, Ptr< Socket > > normalClose, Callback< void, Ptr< Socket > > errorClose)
 Detect socket recv() events such as graceful shutdown or error.
 
void SetConnectCallback (Callback< void, Ptr< Socket > > connectionSucceeded, Callback< void, Ptr< Socket > > connectionFailed)
 Specify callbacks to allow the caller to determine if the connection succeeds of fails.
 
void SetDataSentCallback (Callback< void, Ptr< Socket >, uint32_t > dataSent)
 Notify application when a packet has been sent from transport protocol (non-standard socket call)
 
void SetIpRecvTos (bool ipv4RecvTos)
 Tells a socket to pass information about IP Type of Service up the stack.
 
void SetIpRecvTtl (bool ipv4RecvTtl)
 Tells a socket to pass information about IP_TTL up the stack.
 
void SetIpTos (uint8_t ipTos)
 Manually set IP Type of Service field.
 
virtual void SetIpTtl (uint8_t ipTtl)
 Manually set IP Time to Live field.
 
virtual void SetIpv6HopLimit (uint8_t ipHopLimit)
 Manually set IPv6 Hop Limit.
 
void SetIpv6RecvHopLimit (bool ipv6RecvHopLimit)
 Tells a socket to pass information about IPv6 Hop Limit up the stack.
 
void SetIpv6RecvTclass (bool ipv6RecvTclass)
 Tells a socket to pass information about IPv6 Traffic Class up the stack.
 
void SetIpv6Tclass (int ipTclass)
 Manually set IPv6 Traffic Class field.
 
void SetPriority (uint8_t priority)
 Manually set the socket priority.
 
void SetRecvCallback (Callback< void, Ptr< Socket > > receivedData)
 Notify application when new data is available to be read.
 
void SetRecvPktInfo (bool flag)
 Enable/Disable receive packet information to socket.
 
void SetSendCallback (Callback< void, Ptr< Socket >, uint32_t > sendCb)
 Notify application when space in transmit buffer is added.
 
virtual int ShutdownRecv ()=0
 
virtual int ShutdownSend ()=0
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Socket
static Ptr< SocketCreateSocket (Ptr< Node > node, TypeId tid)
 This method wraps the creation of sockets that is performed on a given node by a SocketFactory specified by TypeId.
 
static TypeId GetTypeId ()
 Get the type ID.
 
static uint8_t IpTos2Priority (uint8_t ipTos)
 Return the priority corresponding to a given TOS value.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Static Public Attributes

static const char *const TcpStateName [TcpSocket::LAST_STATE]
 Literal names of TCP states for use in log messages.
 

Private Member Functions

virtual Time GetConnTimeout () const =0
 Get the connection timeout.
 
virtual uint32_t GetDataRetries () const =0
 Get the number of data transmission retries before giving up.
 
virtual uint32_t GetDelAckMaxCount () const =0
 Get the number of packet to fire an ACK before delay timeout.
 
virtual Time GetDelAckTimeout () const =0
 Get the time to delay an ACK.
 
virtual uint32_t GetInitialCwnd () const =0
 Get the initial Congestion Window.
 
virtual uint32_t GetInitialSSThresh () const =0
 Get the initial Slow Start Threshold.
 
virtual Time GetPersistTimeout () const =0
 Get the timeout for persistent connection.
 
virtual uint32_t GetRcvBufSize () const =0
 Get the receive buffer size.
 
virtual uint32_t GetSegSize () const =0
 Get the segment size.
 
virtual uint32_t GetSndBufSize () const =0
 Get the send buffer size.
 
virtual uint32_t GetSynRetries () const =0
 Get the number of connection retries before giving up.
 
virtual bool GetTcpNoDelay () const =0
 Check if Nagle's algorithm is enabled or not.
 
virtual void SetConnTimeout (Time timeout)=0
 Set the connection timeout.
 
virtual void SetDataRetries (uint32_t retries)=0
 Set the number of data transmission retries before giving up.
 
virtual void SetDelAckMaxCount (uint32_t count)=0
 Set the number of packet to fire an ACK before delay timeout.
 
virtual void SetDelAckTimeout (Time timeout)=0
 Set the time to delay an ACK.
 
virtual void SetInitialCwnd (uint32_t cwnd)=0
 Set the initial Congestion Window.
 
virtual void SetInitialSSThresh (uint32_t threshold)=0
 Set the initial Slow Start Threshold.
 
virtual void SetPersistTimeout (Time timeout)=0
 Set the timeout for persistent connection.
 
virtual void SetRcvBufSize (uint32_t size)=0
 Set the receive buffer size.
 
virtual void SetSegSize (uint32_t size)=0
 Set the segment size.
 
virtual void SetSndBufSize (uint32_t size)=0
 Set the send buffer size.
 
virtual void SetSynRetries (uint32_t count)=0
 Set the number of connection retries before giving up.
 
virtual void SetTcpNoDelay (bool noDelay)=0
 Enable/Disable Nagle's algorithm.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Socket
void DoDispose () override
 Destructor implementation.
 
bool IsManualIpTtl () const
 Checks if the socket has a specific IPv4 TTL set.
 
bool IsManualIpv6HopLimit () const
 Checks if the socket has a specific IPv6 Hop Limit set.
 
bool IsManualIpv6Tclass () const
 Checks if the socket has a specific IPv6 Tclass set.
 
void NotifyConnectionFailed ()
 Notify through the callback (if set) that the connection has not been established due to an error.
 
bool NotifyConnectionRequest (const Address &from)
 Notify through the callback (if set) that an incoming connection is being requested by a remote host.
 
void NotifyConnectionSucceeded ()
 Notify through the callback (if set) that the connection has been established.
 
void NotifyDataRecv ()
 Notify through the callback (if set) that some data have been received.
 
void NotifyDataSent (uint32_t size)
 Notify through the callback (if set) that some data have been sent.
 
void NotifyErrorClose ()
 Notify through the callback (if set) that the connection has been closed due to an error.
 
void NotifyNewConnectionCreated (Ptr< Socket > socket, const Address &from)
 Notify through the callback (if set) that a new connection has been created.
 
void NotifyNormalClose ()
 Notify through the callback (if set) that the connection has been closed.
 
void NotifySend (uint32_t spaceAvailable)
 Notify through the callback (if set) that some data have been sent.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 
- Protected Attributes inherited from ns3::Socket
Ptr< NetDevicem_boundnetdevice
 the device this socket is bound to (might be null).
 
Ipv6Address m_ipv6MulticastGroupAddress
 IPv6 multicast group address.
 
bool m_recvPktInfo
 if the socket should add packet info tags to the packet forwarded to L4.
 

Detailed Description

(abstract) base class of all TcpSockets

This class exists solely for hosting TcpSocket attributes that can be reused across different implementations.

Definition at line 36 of file tcp-socket.h.

Constructor & Destructor Documentation

◆ TcpSocket()

ns3::TcpSocket::TcpSocket ( )

Definition at line 123 of file tcp-socket.cc.

References NS_LOG_FUNCTION.

◆ ~TcpSocket()

ns3::TcpSocket::~TcpSocket ( )
override

Definition at line 128 of file tcp-socket.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ GetConnTimeout()

virtual Time ns3::TcpSocket::GetConnTimeout ( ) const
privatepure virtual

Get the connection timeout.

Returns
the connection timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetDataRetries()

virtual uint32_t ns3::TcpSocket::GetDataRetries ( ) const
privatepure virtual

Get the number of data transmission retries before giving up.

Returns
the number of data transmission retries

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetDelAckMaxCount()

virtual uint32_t ns3::TcpSocket::GetDelAckMaxCount ( ) const
privatepure virtual

Get the number of packet to fire an ACK before delay timeout.

Returns
the number of packet to fire an ACK before delay timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetDelAckTimeout()

virtual Time ns3::TcpSocket::GetDelAckTimeout ( ) const
privatepure virtual

Get the time to delay an ACK.

Returns
the time to delay an ACK

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetInitialCwnd()

virtual uint32_t ns3::TcpSocket::GetInitialCwnd ( ) const
privatepure virtual

Get the initial Congestion Window.

Returns
the initial congestion window (in segments)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetInitialSSThresh()

virtual uint32_t ns3::TcpSocket::GetInitialSSThresh ( ) const
privatepure virtual

Get the initial Slow Start Threshold.

Returns
the Slow Start Threshold (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetPersistTimeout()

virtual Time ns3::TcpSocket::GetPersistTimeout ( ) const
privatepure virtual

Get the timeout for persistent connection.

When the timeout expires, send 1-byte data to probe for the window size at the receiver when the local knowledge tells that the receiver has zero window size

Returns
the persistent timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetRcvBufSize()

virtual uint32_t ns3::TcpSocket::GetRcvBufSize ( ) const
privatepure virtual

Get the receive buffer size.

Returns
the buffer size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSegSize()

virtual uint32_t ns3::TcpSocket::GetSegSize ( ) const
privatepure virtual

Get the segment size.

Returns
the segment size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSndBufSize()

virtual uint32_t ns3::TcpSocket::GetSndBufSize ( ) const
privatepure virtual

Get the send buffer size.

Returns
the buffer size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetSynRetries()

virtual uint32_t ns3::TcpSocket::GetSynRetries ( ) const
privatepure virtual

Get the number of connection retries before giving up.

Returns
the number of connection retries

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTcpNoDelay()

virtual bool ns3::TcpSocket::GetTcpNoDelay ( ) const
privatepure virtual

Check if Nagle's algorithm is enabled or not.

Returns
true if Nagle's algorithm is DISABLED

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::TcpSocket::GetTypeId ( )
static

Get the type ID.

Get the type ID.

Returns
the object TypeId

Definition at line 43 of file tcp-socket.cc.

References GetConnTimeout(), GetDataRetries(), GetDelAckMaxCount(), GetDelAckTimeout(), GetInitialCwnd(), GetInitialSSThresh(), GetPersistTimeout(), GetRcvBufSize(), GetSegSize(), GetSndBufSize(), GetSynRetries(), GetTcpNoDelay(), ns3::MakeBooleanAccessor(), ns3::MakeBooleanChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::Seconds(), SetConnTimeout(), SetDataRetries(), SetDelAckMaxCount(), SetDelAckTimeout(), SetInitialCwnd(), SetInitialSSThresh(), ns3::TypeId::SetParent(), SetPersistTimeout(), SetRcvBufSize(), SetSegSize(), SetSndBufSize(), SetSynRetries(), and SetTcpNoDelay().

Referenced by ns3::ThreeGppHttpServer::StartApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetConnTimeout()

virtual void ns3::TcpSocket::SetConnTimeout ( Time timeout)
privatepure virtual

Set the connection timeout.

Parameters
timeoutthe connection timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDataRetries()

virtual void ns3::TcpSocket::SetDataRetries ( uint32_t retries)
privatepure virtual

Set the number of data transmission retries before giving up.

Parameters
retriesthe number of data transmission retries

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDelAckMaxCount()

virtual void ns3::TcpSocket::SetDelAckMaxCount ( uint32_t count)
privatepure virtual

Set the number of packet to fire an ACK before delay timeout.

Parameters
countthe umber of packet to fire an ACK before delay timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetDelAckTimeout()

virtual void ns3::TcpSocket::SetDelAckTimeout ( Time timeout)
privatepure virtual

Set the time to delay an ACK.

Parameters
timeoutthe time to delay an ACK

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetInitialCwnd()

virtual void ns3::TcpSocket::SetInitialCwnd ( uint32_t cwnd)
privatepure virtual

Set the initial Congestion Window.

Parameters
cwndthe initial congestion window (in segments)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetInitialSSThresh()

virtual void ns3::TcpSocket::SetInitialSSThresh ( uint32_t threshold)
privatepure virtual

Set the initial Slow Start Threshold.

Parameters
thresholdthe Slow Start Threshold (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetPersistTimeout()

virtual void ns3::TcpSocket::SetPersistTimeout ( Time timeout)
privatepure virtual

Set the timeout for persistent connection.

When the timeout expires, send 1-byte data to probe for the window size at the receiver when the local knowledge tells that the receiver has zero window size

Parameters
timeoutthe persistent timeout

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetRcvBufSize()

virtual void ns3::TcpSocket::SetRcvBufSize ( uint32_t size)
privatepure virtual

Set the receive buffer size.

Parameters
sizethe buffer size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSegSize()

virtual void ns3::TcpSocket::SetSegSize ( uint32_t size)
privatepure virtual

Set the segment size.

Parameters
sizethe segment size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSndBufSize()

virtual void ns3::TcpSocket::SetSndBufSize ( uint32_t size)
privatepure virtual

Set the send buffer size.

Parameters
sizethe buffer size (in bytes)

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetSynRetries()

virtual void ns3::TcpSocket::SetSynRetries ( uint32_t count)
privatepure virtual

Set the number of connection retries before giving up.

Parameters
countthe number of connection retries

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

◆ SetTcpNoDelay()

virtual void ns3::TcpSocket::SetTcpNoDelay ( bool noDelay)
privatepure virtual

Enable/Disable Nagle's algorithm.

Parameters
noDelaytrue to DISABLE Nagle's algorithm

Implemented in ns3::TcpSocketBase.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Member Data Documentation

◆ TcpStateName

const char *const ns3::TcpSocket::TcpStateName
static
Initial value:
= {
"CLOSED",
"LISTEN",
"SYN_SENT",
"SYN_RCVD",
"ESTABLISHED",
"CLOSE_WAIT",
"LAST_ACK",
"FIN_WAIT_1",
"FIN_WAIT_2",
"CLOSING",
"TIME_WAIT",
}

Literal names of TCP states for use in log messages.

Definition at line 84 of file tcp-socket.h.

Referenced by ns3::TcpSocketBase::Close(), ns3::TcpSocketBase::CloseAndNotify(), ns3::TcpSocketBase::DoConnect(), ns3::TcpSocketBase::DoForwardUp(), ns3::TcpSocketBase::DoPeerClose(), ns3::TcpSocketBase::IsValidTcpSegment(), ns3::TcpSocketBase::Send(), and ns3::TcpSocketBase::TimeWait().


The documentation for this class was generated from the following files: