--- a/src/node/socket.cc Thu Sep 13 17:47:42 2007 -0700
+++ b/src/node/socket.cc Thu Sep 13 21:36:32 2007 -0700
@@ -20,23 +20,23 @@
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
*/
-#include "ns3/debug.h"
+#include "ns3/log.h"
#include "ns3/packet.h"
#include "socket.h"
-NS_DEBUG_COMPONENT_DEFINE ("Socket");
+NS_LOG_COMPONENT_DEFINE ("Socket");
namespace ns3 {
Socket::~Socket ()
{
- NS_DEBUG("Socket::~Socket ()");
+ NS_LOG_FUNCTION;
}
void
Socket::SetCloseCallback (Callback<void,Ptr<Socket> > closeCompleted)
{
- NS_DEBUG("Socket::SetCloseCallback ()");
+ NS_LOG_FUNCTION;
m_closeCompleted = closeCompleted;
}
@@ -46,7 +46,7 @@
Callback<void, Ptr<Socket> > connectionFailed,
Callback<void, Ptr<Socket> > halfClose)
{
- NS_DEBUG("Socket::SetConnectCallback ()");
+ NS_LOG_FUNCTION;
m_connectionSucceeded = connectionSucceeded;
m_connectionFailed = connectionFailed;
m_halfClose = halfClose;
@@ -58,7 +58,7 @@
Callback<void, Ptr<Socket>, const Address&> newConnectionCreated,
Callback<void, Ptr<Socket> > closeRequested)
{
- NS_DEBUG("Socket::SetAcceptCallback ()");
+ NS_LOG_FUNCTION;
m_connectionRequest = connectionRequest;
m_newConnectionCreated = newConnectionCreated;
m_closeRequested = closeRequested;
@@ -67,22 +67,21 @@
void
Socket::SetSendCallback (Callback<void, Ptr<Socket>, uint32_t> dataSent)
{
- NS_DEBUG("Socket::SetSendCallback ()");
+ NS_LOG_FUNCTION;
m_dataSent = dataSent;
}
void
Socket::SetRecvCallback (Callback<void, Ptr<Socket>, const Packet &,const Address&> receivedData)
{
- NS_DEBUG("Socket::SetRecvCallback ()");
+ NS_LOG_FUNCTION;
m_receivedData = receivedData;
}
void
Socket::NotifyCloseCompleted (void)
{
- NS_DEBUG("Socket::NotifyCloseCompleted ()");
-
+ NS_LOG_FUNCTION;
if (!m_closeCompleted.IsNull ())
{
m_closeCompleted (this);
@@ -92,8 +91,7 @@
void
Socket::NotifyConnectionSucceeded (void)
{
- NS_DEBUG("Socket::NotifyConnectionSucceeded ()");
-
+ NS_LOG_FUNCTION;
if (!m_connectionSucceeded.IsNull ())
{
m_connectionSucceeded (this);
@@ -103,8 +101,7 @@
void
Socket::NotifyConnectionFailed (void)
{
- NS_DEBUG("Socket::NotifyConnectionFailed ()");
-
+ NS_LOG_FUNCTION;
if (!m_connectionFailed.IsNull ())
{
m_connectionFailed (this);
@@ -114,8 +111,7 @@
void
Socket::NotifyHalfClose (void)
{
- NS_DEBUG("Socket::NotifyHalfClose ()");
-
+ NS_LOG_FUNCTION;
if (!m_halfClose.IsNull ())
{
m_halfClose (this);
@@ -125,8 +121,7 @@
bool
Socket::NotifyConnectionRequest (const Address &from)
{
- NS_DEBUG("Socket::NotifyConnectionRequest ()");
-
+ NS_LOG_FUNCTION;
if (!m_connectionRequest.IsNull ())
{
return m_connectionRequest (this, from);
@@ -141,8 +136,7 @@
void
Socket::NotifyNewConnectionCreated (Ptr<Socket> socket, const Address &from)
{
- NS_DEBUG("Socket::NotifyNewConnectionCreated ()");
-
+ NS_LOG_FUNCTION;
if (!m_newConnectionCreated.IsNull ())
{
m_newConnectionCreated (socket, from);
@@ -152,8 +146,7 @@
void
Socket::NotifyCloseRequested (void)
{
- NS_DEBUG("Socket::NotifyCloseRequested ()");
-
+ NS_LOG_FUNCTION;
if (!m_closeRequested.IsNull ())
{
m_closeRequested (this);
@@ -163,8 +156,7 @@
void
Socket::NotifyDataSent (uint32_t size)
{
- NS_DEBUG("Socket::NotifyDataSent ()");
-
+ NS_LOG_FUNCTION;
if (!m_dataSent.IsNull ())
{
m_dataSent (this, size);
@@ -174,8 +166,7 @@
void
Socket::NotifyDataReceived (const Packet &p, const Address &from)
{
- NS_DEBUG("Socket::NotifyDataReceived ()");
-
+ NS_LOG_FUNCTION;
if (!m_receivedData.IsNull ())
{
m_receivedData (this, p, from);