Files
unison/src/node/socket.cc

80 lines
1.9 KiB
C++
Raw Normal View History

#include "socket.h"
namespace ns3 {
Socket::~Socket ()
{}
int
Socket::Close(Callback<void, Ptr<Socket> > closeCompleted)
{
return DoClose (closeCompleted);
}
int
2007-07-27 08:23:20 +02:00
Socket::Connect(const Address & address,
Callback<void, Ptr<Socket> > connectionSucceeded,
Callback<void, Ptr<Socket> > connectionFailed,
Callback<void, Ptr<Socket> > halfClose)
{
return DoConnect (address, connectionSucceeded, connectionFailed, halfClose);
}
int
2007-07-27 08:23:20 +02:00
Socket::Accept(Callback<bool, Ptr<Socket>, const Address&> connectionRequest,
Callback<void, Ptr<Socket>, const Address&> newConnectionCreated,
Callback<void, Ptr<Socket> > closeRequested)
{
return DoAccept (connectionRequest, newConnectionCreated, closeRequested);
}
int
Socket::Send (const uint8_t* buffer,
uint32_t size,
Callback<void, Ptr<Socket>, uint32_t> dataSent)
{
return DoSend (buffer, size, dataSent);
}
int
2007-07-27 08:23:20 +02:00
Socket::SendTo(const Address &address,
const uint8_t *buffer,
uint32_t size,
Callback<void, Ptr<Socket>, uint32_t> dataSent)
{
2007-07-27 08:23:20 +02:00
return DoSendTo (address, buffer, size, dataSent);
}
void
2007-07-27 08:23:20 +02:00
Socket::Recv(Callback<void, Ptr<Socket>, const uint8_t*, uint32_t,const Address&> callback)
{
DoRecv (callback);
}
void
2007-07-27 08:23:20 +02:00
Socket::RecvDummy(Callback<void, Ptr<Socket>, uint32_t,const Address&> callback)
{
DoRecvDummy (callback);
}
bool
2007-07-27 08:23:20 +02:00
Socket::RefuseAllConnections (Ptr<Socket> socket, const Address& address)
{
return false;
}
void
Socket::DummyCallbackVoidSocket (Ptr<Socket> socket)
{}
void
Socket::DummyCallbackVoidSocketUi32 (Ptr<Socket> socket, uint32_t)
{}
void
2007-07-27 08:23:20 +02:00
Socket::DummyCallbackVoidSocketUi32Address (Ptr<Socket> socket, uint32_t, const Address &)
{}
void
2007-07-27 08:23:20 +02:00
Socket::DummyCallbackVoidSocketBufferUi32Address (Ptr<Socket> socket, const uint8_t *, uint32_t,
const Address &)
{}
void
2007-07-27 08:23:20 +02:00
Socket::DummyCallbackVoidSocketAddress (Ptr<Socket> socket, const Address &)
{}
}//namespace ns3