Creating a TcpSocket using a method similar to CreateSocket

12 views
Skip to first unread message

Ashwin Rao

unread,
Jun 1, 2012, 11:23:17 AM6/1/12
to ns-3-users
Hi,

I am currently performing simulations where I create a socket using

sockets = Socket::CreateSocket (n, TcpSocketFactory::GetTypeId ())

where n is of type Ptr<Node>. I would like the variable socket to be
of type Ptr<TcpSocket> rather than Ptr<Socket>. I would like to know
the procedure to create a socket of type Ptr<TcpSocket> rather than
Ptr<Socket>. The reason is that I would like to add some methods to
the TcpSocket and use them in my simulation scripts rather than adding
methods for each implementation derived from Socket.

Regards,
Ashwin
Reply all
Reply to author
Forward
0 new messages