Doxygen the SocketFactory classes
This commit is contained in:
@@ -28,12 +28,26 @@ namespace ns3 {
|
||||
|
||||
class UdpL4Protocol;
|
||||
|
||||
/**
|
||||
* \brief Object to create UDP socket instances
|
||||
*
|
||||
* This class implements the API for UDP sockets.
|
||||
* It is a socket factory (deriving from class SocketFactory) and can
|
||||
* also hold global variables used to initialize newly created sockets,
|
||||
* such as values that are set through the sysctl or proc interfaces in Linux.
|
||||
*/
|
||||
class UdpImpl : public Udp
|
||||
{
|
||||
public:
|
||||
UdpImpl (Ptr<UdpL4Protocol> udp);
|
||||
virtual ~UdpImpl ();
|
||||
|
||||
/**
|
||||
* \return smart pointer to Socket
|
||||
*
|
||||
* Implements a method to create a UdpImpl-based socket and return
|
||||
* a base class smart pointer to the socket.
|
||||
*/
|
||||
virtual Ptr<Socket> CreateSocket (void);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -28,6 +28,22 @@ namespace ns3 {
|
||||
|
||||
class Socket;
|
||||
|
||||
/**
|
||||
* \brief Object to create transport layer instances that provide a
|
||||
* socket API to applications.
|
||||
*
|
||||
* This base class defines the API for creating sockets.
|
||||
* The socket factory also can hold the global variables used to
|
||||
* initialize newly created sockets, such as values that are
|
||||
* set through the sysctl or proc interfaces in Linux.
|
||||
|
||||
* If you want to write a new transport protocol accessible through
|
||||
* sockets, you need to subclass this factory class, implement CreateSocket,
|
||||
* instantiate the object, and aggregate it to the node.
|
||||
*
|
||||
* \see Udp
|
||||
* \see UdpImpl
|
||||
*/
|
||||
class SocketFactory : public Object
|
||||
{
|
||||
public:
|
||||
@@ -35,6 +51,11 @@ public:
|
||||
|
||||
SocketFactory ();
|
||||
|
||||
/**
|
||||
* \return smart pointer to Socket
|
||||
*
|
||||
* Base class method for creating socket instances.
|
||||
*/
|
||||
virtual Ptr<Socket> CreateSocket (void) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -27,6 +27,19 @@ namespace ns3 {
|
||||
|
||||
class Socket;
|
||||
|
||||
/**
|
||||
* \brief API to create UDP socket instances
|
||||
*
|
||||
* This abstract class defines the API for UDP sockets.
|
||||
* This class also can hold the global default variables used to
|
||||
* initialize newly created sockets, such as values that are
|
||||
* set through the sysctl or proc interfaces in Linux.
|
||||
|
||||
* All UDP implementations must provide an implementation of CreateSocket
|
||||
* below.
|
||||
*
|
||||
* \see UdpImpl
|
||||
*/
|
||||
class Udp : public SocketFactory
|
||||
{
|
||||
public:
|
||||
@@ -34,6 +47,12 @@ public:
|
||||
|
||||
Udp ();
|
||||
|
||||
/**
|
||||
* \return smart pointer to Socket
|
||||
*
|
||||
* API for creating socket instances; must be implemented by UDP
|
||||
* implementations..
|
||||
*/
|
||||
virtual Ptr<Socket> CreateSocket (void) = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user