- ns3_sim->create_flow_NS3(src_node, dst_node, port_number, start, addr, TotalBytes, action);
+ ns3::PacketSinkHelper sink("ns3::TcpSocketFactory", ns3::InetSocketAddress (ns3::Ipv4Address::GetAny(), port_number));
+ sink.Install (dst_node);
+
+ ns3::Ptr<ns3::Socket> sock = ns3::Socket::CreateSocket (src_node, ns3::TcpSocketFactory::GetTypeId());
+
+ xbt_dict_set(flowFromSock, transformSocketPtr(sock), new SgFlow(TotalBytes, action), NULL);
+
+ sock->Bind(ns3::InetSocketAddress(port_number));
+ XBT_DEBUG("Create flow starting to %fs + %fs = %fs",
+ startTime-ns3::Simulator::Now().GetSeconds(), ns3::Simulator::Now().GetSeconds(), startTime);
+
+ ns3::Simulator::Schedule (ns3::Seconds(startTime-ns3::Simulator::Now().GetSeconds()),
+ &StartFlow, sock, addr, port_number);