Skip to content
Snippets Groups Projects
Commit 96e4731c authored by Brutzman, Don's avatar Brutzman, Don
Browse files

rename, update deprecated methods on disNetworkedInterface

parent 738351bc
No related branches found
No related tags found
No related merge requests found
......@@ -268,8 +268,8 @@ public class ExampleSimulationProgramFisher
disNetworkInterface = new DisThreadedNetworkInterface(getNetworkAddress(), getNetworkPort());
System.out.println("Network confirmation:" +
" address=" + disNetworkInterface.getAddress()+ // disNetworkInterface.getMulticastGroup() +
" port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort());
" address=" + disNetworkInterface.getAddress() + // disNetworkInterface.getMulticastGroup() +
" port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort());
pduListener = new DisThreadedNetworkInterface.PduListener()
{
/** Callback handler for listener */
......
......@@ -246,8 +246,9 @@ public class homework3Leckie
public void tearDownNetworkInterface()
{
disNetworkInterface.removeListener(pduListener);
disNetworkInterface.kill();
disNetworkInterface = null;
disNetworkInterface.close();
// disNetworkInterface.kill(); // renamed as close(), deprecated
// disNetworkInterface = null; // making sure no possibility of zombie process remaining...
}
/**
......
......@@ -215,7 +215,9 @@ public class ExampleSimulationProgramMcNeely
{
disNetworkInterface = new DisThreadedNetworkInterface(getNetworkAddress(), getNetworkPort());
System.out.println("Network confirmation: address=" + disNetworkInterface.getMulticastGroup() + " port=" + disNetworkInterface.getDisPort());
System.out.println("Network confirmation: address=" +
" address=" + disNetworkInterface.getAddress() + // disNetworkInterface.getMulticastGroup() +
" port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort());
pduListener = new DisThreadedNetworkInterface.PduListener()
{
/** Callback handler for listener */
......@@ -232,8 +234,9 @@ public class ExampleSimulationProgramMcNeely
public void tearDownNetworkInterface()
{
disNetworkInterface.removeListener(pduListener);
disNetworkInterface.kill();
disNetworkInterface = null;
disNetworkInterface.close();
// disNetworkInterface.kill(); // renamed as close(), deprecated
// disNetworkInterface = null; // making sure no possibility of zombie process remaining...
}
/**
......
......@@ -235,8 +235,8 @@ public class MorrisSimulationProgram
disNetworkInterface.setDescriptor ("MorrisSimulationProgram pdu looping");
System.out.println("Network confirmation:" +
" address=" + disNetworkInterface.getAddress()+ // disNetworkInterface.getMulticastGroup() +
" port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort());
" address=" + disNetworkInterface.getAddress() + // disNetworkInterface.getMulticastGroup() +
" port=" + disNetworkInterface.getPort()); // + disNetworkInterface.getDisPort());
pduListener = new DisThreadedNetworkInterface.PduListener()
{
/** Callback handler for listener */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment