View | Details | Raw Unified | Return to bug 2106
Collapse All | Expand All

(-)a/src/network/model/application.cc (+4 lines)
 Lines 49-54   Application::GetTypeId (void) Link Here 
49
                   TimeValue (TimeStep (0)),
49
                   TimeValue (TimeStep (0)),
50
                   MakeTimeAccessor (&Application::m_stopTime),
50
                   MakeTimeAccessor (&Application::m_stopTime),
51
                   MakeTimeChecker ())
51
                   MakeTimeChecker ())
52
    .AddTraceSource ("SocketCreated",
53
                     "A Socket has been created",
54
                     MakeTraceSourceAccessor (&Application::m_socketCreated),
55
                     "ns3::Application::ApplicationSocketCreated")
52
  ;
56
  ;
53
  return tid;
57
  return tid;
54
}
58
}
(-)a/src/network/model/application.h (+11 lines)
 Lines 26-31    Link Here 
26
#include "ns3/object.h"
26
#include "ns3/object.h"
27
#include "ns3/ptr.h"
27
#include "ns3/ptr.h"
28
#include "ns3/node.h"
28
#include "ns3/node.h"
29
#include "ns3/traced-callback.h"
30
#include "ns3/socket.h"
29
31
30
namespace ns3 {
32
namespace ns3 {
31
33
 Lines 104-109   public: Link Here 
104
   */
106
   */
105
  void SetNode (Ptr<Node> node);
107
  void SetNode (Ptr<Node> node);
106
108
109
  /**
110
   * TracedCallback signature for socket creation
111
   *
112
   * \param [in] socket The socket created
113
   */
114
  typedef void (* ApplicationSocketCreated)(const Ptr<const Socket> socket);
115
107
private:
116
private:
108
  /**
117
  /**
109
   * \brief Application specific startup code
118
   * \brief Application specific startup code
 Lines 131-136   protected: Link Here 
131
  Time m_stopTime;          //!< The simulation time that the application will end
140
  Time m_stopTime;          //!< The simulation time that the application will end
132
  EventId m_startEvent;     //!< The event that will fire at m_startTime to start the application
141
  EventId m_startEvent;     //!< The event that will fire at m_startTime to start the application
133
  EventId m_stopEvent;      //!< The event that will fire at m_stopTime to end the application
142
  EventId m_stopEvent;      //!< The event that will fire at m_stopTime to end the application
143
144
  TracedCallback<Ptr<const Socket> > m_socketCreated; //!< TracedCallback for socket creation
134
};
145
};
135
146
136
} // namespace ns3
147
} // namespace ns3

Return to bug 2106