A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::ThreeGppHttpServer Class Reference

Model application which simulates the traffic of a web server. More...

#include "three-gpp-http-server.h"

+ Inheritance diagram for ns3::ThreeGppHttpServer:
+ Collaboration diagram for ns3::ThreeGppHttpServer:

Public Types

typedef void(* ConnectionEstablishedCallback) (Ptr< const ThreeGppHttpServer > httpServer, Ptr< Socket > socket)
 Callback signature for ConnectionEstablished trace source.
 
enum  State_t { NOT_STARTED = 0 , STARTED , STOPPED }
 The possible states of the application. More...
 
typedef void(* ThreeGppHttpObjectCallback) (uint32_t size)
 Common callback signature for MainObject and EmbeddedObject trace sources.
 
- Public Types inherited from ns3::Application
typedef void(* DelayAddressCallback) (const Time &delay, const Address &from)
 Common callback signature for packet delay and address.
 
typedef void(* StateTransitionCallback) (const std::string &oldState, const std::string &newState)
 Common signature used by callbacks to application's state transition trace source.
 

Public Member Functions

 ThreeGppHttpServer ()
 Creates a new instance of HTTP server application.
 
Ptr< SocketGetSocket () const
 Returns a pointer to the listening socket.
 
State_t GetState () const
 Returns the current state of the application.
 
std::string GetStateString () const
 Returns the current state of the application in string format.
 
void SetMtuSize (uint32_t mtuSize)
 Sets the maximum transmission unit (MTU) size used by the application.
 
- Public Member Functions inherited from ns3::Application
 Application ()
 
 ~Application () override
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this Application object.
 
Ptr< NodeGetNode () const
 
void SetNode (Ptr< Node > node)
 
void SetStartTime (Time start)
 Specify application start time.
 
void SetStopTime (Time stop)
 Specify application stop time.
 
- 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 std::string GetStateString (State_t state)
 Returns the given state in string format.
 
static TypeId GetTypeId ()
 Returns the object TypeId.
 
- Static Public Member Functions inherited from ns3::Application
static TypeId GetTypeId ()
 Get the type ID.
 
- 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.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::Application
void DoInitialize () override
 Initialize() implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
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.
 

Private Member Functions

bool ConnectionRequestCallback (Ptr< Socket > socket, const Address &address)
 Invoked when m_initialSocket receives a connection request.
 
void ErrorCloseCallback (Ptr< Socket > socket)
 Invoked when a connection with a web client is terminated.
 
void NewConnectionCreatedCallback (Ptr< Socket > socket, const Address &address)
 Invoked when a new connection has been established.
 
void NormalCloseCallback (Ptr< Socket > socket)
 Invoked when a connection with a web client is terminated.
 
void ReceivedDataCallback (Ptr< Socket > socket)
 Invoked when m_initialSocket receives some packet data.
 
void SendCallback (Ptr< Socket > socket, uint32_t availableBufferSize)
 Invoked when more buffer space for transmission is added to a socket.
 
uint32_t ServeFromTxBuffer (Ptr< Socket > socket)
 Creates a packet out of a pending object in the Tx buffer send it over the given socket.
 
void ServeNewEmbeddedObject (Ptr< Socket > socket)
 Generates a new embedded object and push it into the Tx buffer.
 
void ServeNewMainObject (Ptr< Socket > socket)
 Generates a new main object and push it into the Tx buffer.
 
void StartApplication () override
 Application specific startup code.
 
void StopApplication () override
 Application specific shutdown code.
 
void SwitchToState (State_t state)
 Change the state of the server.
 

Private Attributes

TracedCallback< Ptr< const ThreeGppHttpServer >, Ptr< Socket > > m_connectionEstablishedTrace
 The ConnectionEstablished trace source.
 
TracedCallback< uint32_tm_embeddedObjectTrace
 The EmbeddedObject trace source.
 
Ptr< ThreeGppHttpVariablesm_httpVariables
 The Variables attribute.
 
Ptr< Socketm_initialSocket
 The listening socket, for receiving connection requests from clients.
 
Address m_localAddress
 The LocalAddress attribute.
 
uint16_t m_localPort
 The LocalPort attribute.
 
TracedCallback< uint32_tm_mainObjectTrace
 The MainObject trace source.
 
uint32_t m_mtuSize
 The Mtu attribute.
 
TracedCallback< const Time &, const Address & > m_rxDelayTrace
 The RxDelay trace source.
 
TracedCallback< Ptr< const Packet >, const Address & > m_rxTrace
 The Rx trace source.
 
State_t m_state
 The current state of the client application. Begins with NOT_STARTED.
 
TracedCallback< const std::string &, const std::string & > m_stateTransitionTrace
 The StateTransition trace source.
 
uint8_t m_tos
 The Tos attribute.
 
Ptr< ThreeGppHttpServerTxBufferm_txBuffer
 Pointer to the transmission buffer.
 
TracedCallback< Ptr< const Packet > > m_txTrace
 The Tx trace source.
 

Additional Inherited Members

- Protected Attributes inherited from ns3::Application
Ptr< Nodem_node
 The node that this application is installed on.
 
EventId m_startEvent
 The event that will fire at m_startTime to start the application.
 
Time m_startTime
 The simulation time that the application will start.
 
EventId m_stopEvent
 The event that will fire at m_stopTime to end the application.
 
Time m_stopTime
 The simulation time that the application will end.
 

Detailed Description

Model application which simulates the traffic of a web server.

This application works in conjunction with ThreeGppHttpClient applications.

The application works by responding to requests. Each request is a small packet of data which contains ThreeGppHttpHeader. The value of the content type field of the header determines the type of object that the client is requesting. The possible type is either a main object or an embedded object.

The application is responsible to generate the right type of object and send it back to the client. The size of each object to be sent is randomly determined (see ThreeGppHttpVariables). Each object may be sent as multiple packets due to limited socket buffer space.

To assist with the transmission, the application maintains several instances of ThreeGppHttpServerTxBuffer. Each instance keeps track of the object type to be served and the number of bytes left to be sent.

The application accepts connection request from clients. Every connection is kept open until the client disconnects.

Definition at line 57 of file three-gpp-http-server.h.

Member Typedef Documentation

◆ ConnectionEstablishedCallback

typedef void(* ns3::ThreeGppHttpServer::ConnectionEstablishedCallback) (Ptr< const ThreeGppHttpServer > httpServer, Ptr< Socket > socket)

Callback signature for ConnectionEstablished trace source.

Parameters
httpServerPointer to this instance of ThreeGppHttpServer, which is where the trace originated.
socketPointer to the socket where the connection is established.

Definition at line 136 of file three-gpp-http-server.h.

◆ ThreeGppHttpObjectCallback

typedef void(* ns3::ThreeGppHttpServer::ThreeGppHttpObjectCallback) (uint32_t size)

Common callback signature for MainObject and EmbeddedObject trace sources.

Parameters
sizeSize of the generated object in bytes.

Definition at line 128 of file three-gpp-http-server.h.

Member Enumeration Documentation

◆ State_t

The possible states of the application.

Enumerator
NOT_STARTED 

Before StartApplication() is invoked.

STARTED 

Passively listening and responding to requests.

STOPPED 

After StopApplication() is invoked.

Definition at line 97 of file three-gpp-http-server.h.

Constructor & Destructor Documentation

◆ ThreeGppHttpServer()

ns3::ThreeGppHttpServer::ThreeGppHttpServer ( )

Creates a new instance of HTTP server application.

After creation, the application must be further configured through attributes. To avoid having to do this process manually, please use ThreeGppHttpServerHelper.

Upon creation, the application randomly determines the MTU size that it will use (either 536 or 1460 bytes). The chosen size will be used while creating the listener socket.

Definition at line 36 of file three-gpp-http-server.cc.

References m_httpVariables, m_mtuSize, NS_LOG_FUNCTION, and NS_LOG_INFO.

Member Function Documentation

◆ ConnectionRequestCallback()

bool ns3::ThreeGppHttpServer::ConnectionRequestCallback ( Ptr< Socket > socket,
const Address & address )
private

Invoked when m_initialSocket receives a connection request.

Parameters
socketPointer to the socket where the event originates from.
addressThe address of the remote client where the connection request comes from.
Returns
Always true, to indicate to the other end that the connection request is accepted.

Definition at line 283 of file three-gpp-http-server.cc.

References NS_LOG_FUNCTION.

Referenced by StartApplication().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::ThreeGppHttpServer::DoDispose ( )
overrideprotectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Application.

Definition at line 165 of file three-gpp-http-server.cc.

References ns3::Application::DoDispose(), ns3::Simulator::IsFinished(), NS_LOG_FUNCTION, and StopApplication().

+ Here is the call graph for this function:

◆ ErrorCloseCallback()

void ns3::ThreeGppHttpServer::ErrorCloseCallback ( Ptr< Socket > socket)
private

Invoked when a connection with a web client is terminated.

The corresponding socket will be removed from Tx buffer.

Parameters
socketPointer to the socket where the event originates from.

Definition at line 352 of file three-gpp-http-server.cc.

References m_initialSocket, m_state, m_txBuffer, NS_FATAL_ERROR, NS_LOG_FUNCTION, and STARTED.

Referenced by NewConnectionCreatedCallback(), and StartApplication().

+ Here is the caller graph for this function:

◆ GetSocket()

Ptr< Socket > ns3::ThreeGppHttpServer::GetSocket ( ) const

Returns a pointer to the listening socket.

Returns
Pointer to the listening socket

Definition at line 129 of file three-gpp-http-server.cc.

References m_initialSocket.

◆ GetState()

ThreeGppHttpServer::State_t ns3::ThreeGppHttpServer::GetState ( ) const

Returns the current state of the application.

Returns
The current state of the application.

Definition at line 135 of file three-gpp-http-server.cc.

References m_state.

◆ GetStateString() [1/2]

std::string ns3::ThreeGppHttpServer::GetStateString ( ) const

Returns the current state of the application in string format.

Returns
The current state of the application in string format.

Definition at line 141 of file three-gpp-http-server.cc.

References GetStateString(), and m_state.

Referenced by GetStateString(), StartApplication(), and SwitchToState().

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

◆ GetStateString() [2/2]

std::string ns3::ThreeGppHttpServer::GetStateString ( ThreeGppHttpServer::State_t state)
static

Returns the given state in string format.

Parameters
stateAn arbitrary state of an application.
Returns
The given state equivalently expressed in string format.

Definition at line 148 of file three-gpp-http-server.cc.

References NOT_STARTED, NS_FATAL_ERROR, STARTED, and STOPPED.

◆ GetTypeId()

TypeId ns3::ThreeGppHttpServer::GetTypeId ( )
static

◆ NewConnectionCreatedCallback()

void ns3::ThreeGppHttpServer::NewConnectionCreatedCallback ( Ptr< Socket > socket,
const Address & address )
private

Invoked when a new connection has been established.

Parameters
socketPointer to the socket that maintains the connection to the remote client. This socket will be saved to the Tx buffer.
addressThe address the connection is incoming from.

Definition at line 290 of file three-gpp-http-server.cc.

References ErrorCloseCallback(), m_connectionEstablishedTrace, m_txBuffer, ns3::MakeCallback(), NormalCloseCallback(), NS_LOG_FUNCTION, ReceivedDataCallback(), and SendCallback().

Referenced by StartApplication().

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

◆ NormalCloseCallback()

void ns3::ThreeGppHttpServer::NormalCloseCallback ( Ptr< Socket > socket)
private

Invoked when a connection with a web client is terminated.

The corresponding socket will be removed from Tx buffer.

Parameters
socketPointer to the socket where the event originates from.

Definition at line 316 of file three-gpp-http-server.cc.

References m_initialSocket, m_state, m_txBuffer, NS_FATAL_ERROR, NS_LOG_FUNCTION, and STARTED.

Referenced by NewConnectionCreatedCallback(), and StartApplication().

+ Here is the caller graph for this function:

◆ ReceivedDataCallback()

void ns3::ThreeGppHttpServer::ReceivedDataCallback ( Ptr< Socket > socket)
private

Invoked when m_initialSocket receives some packet data.

It will check the packet for ThreeGppHttpHeader. It also fires the Rx trace source.

Depending on the type of object requested, the method will trigger ServeMainObject() or ServeEmbeddedObject() after some delays.

Parameters
socketPointer to the socket where the event originates from.

Definition at line 371 of file three-gpp-http-server.cc.

References ns3::Time::As(), ns3::Inet6SocketAddress::ConvertFrom(), ns3::InetSocketAddress::ConvertFrom(), ns3::ThreeGppHttpHeader::EMBEDDED_OBJECT, ns3::ThreeGppHttpHeader::GetClientTs(), ns3::ThreeGppHttpHeader::GetContentType(), ns3::InetSocketAddress::GetIpv4(), ns3::Inet6SocketAddress::GetIpv6(), ns3::Inet6SocketAddress::GetPort(), ns3::InetSocketAddress::GetPort(), ns3::Inet6SocketAddress::IsMatchingType(), ns3::InetSocketAddress::IsMatchingType(), m_httpVariables, m_rxDelayTrace, m_rxTrace, m_txBuffer, ns3::ThreeGppHttpHeader::MAIN_OBJECT, ns3::Simulator::Now(), NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, ns3::Time::S, ns3::Simulator::Schedule(), ServeNewEmbeddedObject(), and ServeNewMainObject().

Referenced by NewConnectionCreatedCallback(), and StartApplication().

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

◆ SendCallback()

void ns3::ThreeGppHttpServer::SendCallback ( Ptr< Socket > socket,
uint32_t availableBufferSize )
private

Invoked when more buffer space for transmission is added to a socket.

The method will invoke ServeFromTxBuffer() to start some transmission using the socket.

Parameters
socketPointer to the socket where the event originates from.
availableBufferSizeThe number of bytes available in the socket's transmission buffer.

Definition at line 449 of file three-gpp-http-server.cc.

References ns3::ThreeGppHttpHeader::EMBEDDED_OBJECT, m_txBuffer, ns3::ThreeGppHttpHeader::MAIN_OBJECT, NS_FATAL_ERROR, NS_LOG_FUNCTION, NS_LOG_INFO, and ServeFromTxBuffer().

Referenced by NewConnectionCreatedCallback(), and StartApplication().

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

◆ ServeFromTxBuffer()

uint32_t ns3::ThreeGppHttpServer::ServeFromTxBuffer ( Ptr< Socket > socket)
private

Creates a packet out of a pending object in the Tx buffer send it over the given socket.

If the socket capacity is smaller than the object size, then the method only convert a part of the object into a packet.

ThreeGppHttpHeader will be attached in the beginning of each application layer packet - if a packet is split, then then the following parts will not have the header. The method fires the Tx trace source after sending the packet to the socket.

This method is invoked when a new object is generated by ServeNewMainObject() or ServeNewEmbeddedObject(). It's also invoked when the socket informs (through SendCallback()) that more buffer space for transmission has become available.

Parameters
socketPointer to the socket which is associated with the destination client.
Returns
Size of the packet sent (in bytes).

Definition at line 543 of file three-gpp-http-server.cc.

References ns3::Create(), ns3::ThreeGppHttpHeader::GetClientTs(), ns3::ThreeGppHttpHeader::GetSerializedSize(), m_txBuffer, m_txTrace, ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, NS_LOG_LOGIC, packetSize, ns3::Time::S, ns3::ThreeGppHttpHeader::SetClientTs(), ns3::ThreeGppHttpHeader::SetContentLength(), ns3::ThreeGppHttpHeader::SetContentType(), and ns3::ThreeGppHttpHeader::SetServerTs().

Referenced by SendCallback(), ServeNewEmbeddedObject(), and ServeNewMainObject().

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

◆ ServeNewEmbeddedObject()

void ns3::ThreeGppHttpServer::ServeNewEmbeddedObject ( Ptr< Socket > socket)
private

Generates a new embedded object and push it into the Tx buffer.

The size of the object is randomly determined by ThreeGppHttpVariables. Fires the EmbeddedObject trace source. It then immediately triggers ServeFromTxBuffer() to send the object.

Parameters
socketPointer to the socket which is associated with the destination client.

Definition at line 521 of file three-gpp-http-server.cc.

References ns3::ThreeGppHttpHeader::EMBEDDED_OBJECT, m_embeddedObjectTrace, m_httpVariables, m_txBuffer, NS_LOG_FUNCTION, NS_LOG_INFO, and ServeFromTxBuffer().

Referenced by ReceivedDataCallback().

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

◆ ServeNewMainObject()

void ns3::ThreeGppHttpServer::ServeNewMainObject ( Ptr< Socket > socket)
private

Generates a new main object and push it into the Tx buffer.

The size of the object is randomly determined by ThreeGppHttpVariables. Fires the MainObject trace source. It then immediately triggers ServeFromTxBuffer() to send the object.

Parameters
socketPointer to the socket which is associated with the destination client.

Definition at line 499 of file three-gpp-http-server.cc.

References m_httpVariables, m_mainObjectTrace, m_txBuffer, ns3::ThreeGppHttpHeader::MAIN_OBJECT, NS_LOG_FUNCTION, NS_LOG_INFO, and ServeFromTxBuffer().

Referenced by ReceivedDataCallback().

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

◆ SetMtuSize()

void ns3::ThreeGppHttpServer::SetMtuSize ( uint32_t mtuSize)

Sets the maximum transmission unit (MTU) size used by the application.

This overrides the MTU size which is randomly determined once the application is created. Values other than the standard 536 and 1460 bytes can be set using this method.

Parameters
mtuSizeMTU size in bytes.

Definition at line 122 of file three-gpp-http-server.cc.

References m_mtuSize, and NS_LOG_FUNCTION.

◆ StartApplication()

void ns3::ThreeGppHttpServer::StartApplication ( )
overrideprivatevirtual

Application specific startup code.

The StartApplication method is called at the start time specified by Start This method should be overridden by all or most application subclasses.

Reimplemented from ns3::Application.

Definition at line 178 of file three-gpp-http-server.cc.

References ns3::Socket::Bind(), ConnectionRequestCallback(), ns3::Ipv4Address::ConvertFrom(), ns3::Ipv6Address::ConvertFrom(), ns3::Socket::CreateSocket(), ErrorCloseCallback(), ns3::TypeId::GetAttribute(), ns3::TypeId::GetAttributeN(), ns3::Socket::GetErrno(), ns3::Application::GetNode(), GetStateString(), ns3::TcpSocket::GetTypeId(), ns3::TcpSocketFactory::GetTypeId(), ns3::TypeId::AttributeInformation::initialValue, ns3::Address::IsInvalid(), ns3::Ipv4Address::IsMatchingType(), ns3::Ipv6Address::IsMatchingType(), ns3::Socket::Listen(), m_httpVariables, m_initialSocket, m_localAddress, m_localPort, m_mtuSize, m_state, m_tos, ns3::MakeCallback(), ns3::TypeId::AttributeInformation::name, NewConnectionCreatedCallback(), NormalCloseCallback(), NOT_STARTED, NS_ABORT_MSG, NS_ABORT_MSG_IF, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, ReceivedDataCallback(), SendCallback(), ns3::Socket::SetAcceptCallback(), ns3::ObjectBase::SetAttribute(), ns3::Socket::SetCloseCallbacks(), ns3::Socket::SetIpTos(), ns3::Socket::SetRecvCallback(), ns3::Socket::SetSendCallback(), STARTED, and SwitchToState().

+ Here is the call graph for this function:

◆ StopApplication()

void ns3::ThreeGppHttpServer::StopApplication ( )
overrideprivatevirtual

Application specific shutdown code.

The StopApplication method is called at the stop time specified by Stop This method should be overridden by all or most application subclasses.

Reimplemented from ns3::Application.

Definition at line 260 of file three-gpp-http-server.cc.

References ns3::Socket::Close(), m_initialSocket, m_txBuffer, ns3::MakeNullCallback(), NS_LOG_FUNCTION, ns3::Socket::SetAcceptCallback(), ns3::Socket::SetCloseCallbacks(), ns3::Socket::SetRecvCallback(), ns3::Socket::SetSendCallback(), STOPPED, and SwitchToState().

Referenced by DoDispose().

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

◆ SwitchToState()

void ns3::ThreeGppHttpServer::SwitchToState ( ThreeGppHttpServer::State_t state)
private

Change the state of the server.

Fires the StateTransition trace source.

Parameters
stateThe new state.

Definition at line 620 of file three-gpp-http-server.cc.

References GetStateString(), m_state, m_stateTransitionTrace, NS_LOG_FUNCTION, and NS_LOG_INFO.

Referenced by StartApplication(), and StopApplication().

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

Member Data Documentation

◆ m_connectionEstablishedTrace

TracedCallback<Ptr<const ThreeGppHttpServer>, Ptr<Socket> > ns3::ThreeGppHttpServer::m_connectionEstablishedTrace
private

The ConnectionEstablished trace source.

Definition at line 270 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and NewConnectionCreatedCallback().

◆ m_embeddedObjectTrace

TracedCallback<uint32_t> ns3::ThreeGppHttpServer::m_embeddedObjectTrace
private

The EmbeddedObject trace source.

Definition at line 274 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and ServeNewEmbeddedObject().

◆ m_httpVariables

Ptr<ThreeGppHttpVariables> ns3::ThreeGppHttpServer::m_httpVariables
private

◆ m_initialSocket

Ptr<Socket> ns3::ThreeGppHttpServer::m_initialSocket
private

The listening socket, for receiving connection requests from clients.

Definition at line 250 of file three-gpp-http-server.h.

Referenced by ErrorCloseCallback(), GetSocket(), NormalCloseCallback(), StartApplication(), and StopApplication().

◆ m_localAddress

Address ns3::ThreeGppHttpServer::m_localAddress
private

The LocalAddress attribute.

Definition at line 259 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and StartApplication().

◆ m_localPort

uint16_t ns3::ThreeGppHttpServer::m_localPort
private

The LocalPort attribute.

Definition at line 261 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and StartApplication().

◆ m_mainObjectTrace

TracedCallback<uint32_t> ns3::ThreeGppHttpServer::m_mainObjectTrace
private

The MainObject trace source.

Definition at line 272 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and ServeNewMainObject().

◆ m_mtuSize

uint32_t ns3::ThreeGppHttpServer::m_mtuSize
private

The Mtu attribute.

Definition at line 265 of file three-gpp-http-server.h.

Referenced by ThreeGppHttpServer(), GetTypeId(), SetMtuSize(), and StartApplication().

◆ m_rxDelayTrace

TracedCallback<const Time&, const Address&> ns3::ThreeGppHttpServer::m_rxDelayTrace
private

The RxDelay trace source.

Definition at line 280 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and ReceivedDataCallback().

◆ m_rxTrace

TracedCallback<Ptr<const Packet>, const Address&> ns3::ThreeGppHttpServer::m_rxTrace
private

The Rx trace source.

Definition at line 278 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and ReceivedDataCallback().

◆ m_state

State_t ns3::ThreeGppHttpServer::m_state
private

The current state of the client application. Begins with NOT_STARTED.

Definition at line 248 of file three-gpp-http-server.h.

Referenced by ErrorCloseCallback(), GetState(), GetStateString(), NormalCloseCallback(), StartApplication(), and SwitchToState().

◆ m_stateTransitionTrace

TracedCallback<const std::string&, const std::string&> ns3::ThreeGppHttpServer::m_stateTransitionTrace
private

The StateTransition trace source.

Definition at line 282 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and SwitchToState().

◆ m_tos

uint8_t ns3::ThreeGppHttpServer::m_tos
private

The Tos attribute.

Definition at line 263 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and StartApplication().

◆ m_txBuffer

◆ m_txTrace

TracedCallback<Ptr<const Packet> > ns3::ThreeGppHttpServer::m_txTrace
private

The Tx trace source.

Definition at line 276 of file three-gpp-http-server.h.

Referenced by GetTypeId(), and ServeFromTxBuffer().


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