const char* hname = "localhost"; Address * my_tx_addr = new Address(hname, 3000);
//configure sending port Address * dst_addr = new Address(argv[1], (short)(atoi(argv[2]))); mySendingPort *my_port = new mySendingPort(); my_port->setAddress(my_tx_addr); my_port->setRemoteAddress(dst_addr); my_port->init();
//configure receiving port to listen to ACK frames Address * my_rx_addr = new Address(hname, (short)(atoi(argv[3]))); LossyReceivingPort *my_rx_port = new LossyReceivingPort(0.5); my_rx_port->setAddress(my_rx_addr); my_rx_port->init();
|
const char* hname = "localhost";
//configure receiving port Address * my_addr = new Address(hname, (short)(atoi(argv[1]))); LossyReceivingPort *my_port = new LossyReceivingPort(0.5); my_port->setAddress(my_addr); my_port->init();
//configure a sending port to send ACK Address * my_tx_addr = new Address(hname, 3005); Address * dst_addr = new Address(argv[2], (short)(atoi(argv[3]))); mySendingPort *my_tx_port = new mySendingPort(); my_tx_port->setAddress(my_tx_addr); my_tx_port->setRemoteAddress(dst_addr); my_tx_port->init();
|