class MyApp(ns3.Application):
def Start(self):
# _socket is meant to be a private member of MyApp
_socket = ns3.Socket…
_socket.SetRecvCallback(self.Receive)
def Send(self):
# Protocol header
header = ...
# Size of data packet we need
size = header.GetSerializedSize()
packet = ns3.network.Packet(size)
packet.AddHeader(header)
_socket.Send(packet)
def Receive(self, packet):
packet = _socket.Recv()
...--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/Of_g2in8Kgc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.