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

clear javadoc warnings for main methods

parent 6a8cb919
No related branches found
No related tags found
No related merge requests found
Showing
with 481 additions and 487 deletions
# Start, ENCODING_PLAINTEXT, 20210827_081355, DIS capture file, .\pduLog\PduCaptureLog9.dislog
[0,0,0,0,0,0,0,0],[7,1,1,1,59,81,9,125,0,-112,40,0,0,1,0,2,0,3,0,0,0,0,0,-31,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,-16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE
[0,0,0,0,5,38,8,4],[7,1,2,2,59,81,37,117,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE
[0,0,0,0,12,75,67,56],[7,1,22,5,59,103,-91,-95,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,49,0,0] # DisPduType 22 COMMENT
[0,0,0,0,78,34,-89,-80],[7,1,1,1,59,81,9,125,0,-112,40,0,0,1,0,2,0,3,0,0,0,0,0,-31,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE
[0,0,0,0,84,-119,36,8],[7,1,2,2,59,81,37,117,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE
[0,0,0,0,90,-8,-103,-92],[7,1,22,5,59,127,-41,57,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,50,0,0] # DisPduType 22 COMMENT
[0,0,0,0,-99,107,74,-64],[7,1,1,1,59,81,9,125,0,-112,40,0,0,1,0,2,0,3,0,0,0,0,0,-31,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE
[0,0,0,0,-93,-23,127,-64],[7,1,2,2,59,81,37,117,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE
[0,0,0,0,-86,105,84,96],[7,1,22,5,59,-104,27,115,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,51,0,0] # DisPduType 22 COMMENT
[0,0,0,0,-19,22,-46,-100],[7,1,1,1,59,81,9,125,0,-112,40,0,0,1,0,2,0,3,0,0,0,0,0,-31,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE
[0,0,0,0,-13,-109,84,16],[7,1,2,2,59,81,37,117,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE
[0,0,0,0,-6,36,67,52],[7,1,22,5,59,-80,114,83,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,52,0,0] # DisPduType 22 COMMENT
[0,0,0,1,60,-100,-78,60],[7,1,1,1,59,81,9,125,0,-112,40,0,0,1,0,2,0,3,0,0,0,0,0,-31,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 01 ENTITY_STATE
[0,0,0,1,67,33,59,40],[7,1,2,2,59,81,37,117,0,96,40,0,0,2,0,3,0,0,0,2,0,3,0,0,0,2,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # DisPduType 02 FIRE
[0,0,0,1,73,-90,16,64],[7,1,22,5,59,-56,-69,55,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,-81,-46,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,0,-81,-46,0,0,0,-80,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,108,111,111,112,32,53,0,0] # DisPduType 22 COMMENT
[0,0,0,1,80,35,-107,-36],[7,1,22,5,59,-54,-73,49,0,32,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,9,90,-90,0,0,0,-8,77,86,51,53,48,48,32,69,120,97,109,112,108,101,83,105,109,117,108,97,116,105,111,110,80,114,111,103,114,97,109,0,0,9,90,-90,0,0,1,48,114,117,110,83,105,109,117,108,97,116,105,111,110,40,41,32,99,111,109,112,108,101,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,0] # DisPduType 22 COMMENT
# Finish, ENCODING_PLAINTEXT, 20210827_081401, DIS capture file, .\pduLog\PduCaptureLog9.dislog
package MV3500Cohort2018JanuaryMarch.homework1;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// no package required or desired, use Netbeans menu item "Run File
import java.io.*;
import java.net.*;
/**
*
* @author cs2017
*/
public class AngelClient {
/**
* @param args command-line arguments
*/
public static void main(String[] args)
{
boolean operate = true;
while (operate)
{
try
{
System.out.println("creating socket");
// We request an IP to connect to ("localhost") and
// port number at that IP (2317). This establishes
// a connection to that IP in the form of the Socket
// object; the server uses a ServerSocket to wait for
// connections.
Socket socket = new Socket("localhost", 2317);
// Read the single line written by the server. We'd
// do things a bit differently if many lines to be read
// from the server, instead of one only.
InputStream is = socket.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String serverMessage = br.readLine();
if ("Exit".equals(serverMessage)){
System.out.println("The server has asked to shut the client down.");
operate = false;
}
else {
int spd = Integer.parseInt(br.readLine());
int x = Integer.parseInt(br.readLine());
int y = Integer.parseInt(br.readLine());
int z = Integer.parseInt(br.readLine());
String lastCommand = br.readLine();
AngelTank tank = new AngelTank(serverMessage, spd, new int[]{x, y, z});
System.out.println(serverMessage+" is traveling at "+spd+" with position ("+x+", "+y+", "+z+").");
if ("Exit".equals(lastCommand)){
System.out.println("The server has asked to shut the client down.");
operate = false;
}
}
}
catch(IOException e)
{
System.out.println(e);
System.out.println("Problem with client");
}
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// no package required or desired, use Netbeans menu item "Run File
import java.io.*;
import java.net.*;
/**
*
* @author cs2017
*/
public class AngelClient {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args)
{
boolean operate = true;
while (operate)
{
try
{
System.out.println("creating socket");
// We request an IP to connect to ("localhost") and
// port number at that IP (2317). This establishes
// a connection to that IP in the form of the Socket
// object; the server uses a ServerSocket to wait for
// connections.
Socket socket = new Socket("localhost", 2317);
// Read the single line written by the server. We'd
// do things a bit differently if many lines to be read
// from the server, instead of one only.
InputStream is = socket.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String serverMessage = br.readLine();
if ("Exit".equals(serverMessage)){
System.out.println("The server has asked to shut the client down.");
operate = false;
}
else {
int spd = Integer.parseInt(br.readLine());
int x = Integer.parseInt(br.readLine());
int y = Integer.parseInt(br.readLine());
int z = Integer.parseInt(br.readLine());
String lastCommand = br.readLine();
AngelTank tank = new AngelTank(serverMessage, spd, new int[]{x, y, z});
System.out.println(serverMessage+" is traveling at "+spd+" with position ("+x+", "+y+", "+z+").");
if ("Exit".equals(lastCommand)){
System.out.println("The server has asked to shut the client down.");
operate = false;
}
}
}
catch(IOException e)
{
System.out.println(e);
System.out.println("Problem with client");
}
}
}
}
package MV3500Cohort2018JanuaryMarch.homework1;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// no package required or desired, use Netbeans menu item "Run File"
import java.io.*;
import java.net.*;
/**
*
* @author cs2017
*/
public class AngelServer {
/**
* @param args command-line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
boolean goforit = true;
try
{
// ServerSocket waits for a connection from a client.
// Notice that it is outside the loop; ServerSocket
// needs to be made only once.
ServerSocket serverSocket = new ServerSocket(2317);
// Loop, infinitely, waiting for client connections.
// Stop the program somewhere else.
while(goforit)
{
Socket clientConnection = serverSocket.accept();
OutputStream os = clientConnection.getOutputStream();
PrintStream ps = new PrintStream(os);
// Print some information locally about the Socket
// connection. This includes the port and IP numbers
// on both sides (the socket pair.)
InetAddress localAddress = clientConnection.getLocalAddress();
InetAddress remoteAddress = clientConnection.getInetAddress();
int localPort = clientConnection.getLocalPort();
int remotePort = clientConnection.getPort();
// My socket pair connection looks like this, to localhost:
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54876 ))
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54881 ))
//
// Why is the first IP/port the same, while the second set has
// different ports?
System.out.println("Socket pair: (( " + localAddress.toString() + ", " + localPort + " ), ( " +
remoteAddress.toString() + ", " + remotePort + " ))");
// Notice the use of flush() and close(). Without
// the close() to Socket object may stay open for
// a while after the client has stopped needing this
// connection. Close() explicitly ends the connection.
ps.println("Abrams 1");
ps.println(60);
ps.println(152);
ps.println(25);
ps.println(30);
ps.println("Exit");
ps.flush();
clientConnection.close();
}
}
catch(Exception e)
{
System.out.println("problem with networking");
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// no package required or desired, use Netbeans menu item "Run File"
import java.io.*;
import java.net.*;
/**
*
* @author cs2017
*/
public class AngelServer {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
boolean goforit = true;
try
{
// ServerSocket waits for a connection from a client.
// Notice that it is outside the loop; ServerSocket
// needs to be made only once.
ServerSocket serverSocket = new ServerSocket(2317);
// Loop, infinitely, waiting for client connections.
// Stop the program somewhere else.
while(goforit)
{
Socket clientConnection = serverSocket.accept();
OutputStream os = clientConnection.getOutputStream();
PrintStream ps = new PrintStream(os);
// Print some information locally about the Socket
// connection. This includes the port and IP numbers
// on both sides (the socket pair.)
InetAddress localAddress = clientConnection.getLocalAddress();
InetAddress remoteAddress = clientConnection.getInetAddress();
int localPort = clientConnection.getLocalPort();
int remotePort = clientConnection.getPort();
// My socket pair connection looks like this, to localhost:
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54876 ))
// Socket pair: (( /0:0:0:0:0:0:0:1, 2317 ), ( /0:0:0:0:0:0:0:1, 54881 ))
//
// Why is the first IP/port the same, while the second set has
// different ports?
System.out.println("Socket pair: (( " + localAddress.toString() + ", " + localPort + " ), ( " +
remoteAddress.toString() + ", " + remotePort + " ))");
// Notice the use of flush() and close(). Without
// the close() to Socket object may stay open for
// a while after the client has stopped needing this
// connection. Close() explicitly ends the connection.
ps.println("Abrams 1");
ps.println(60);
ps.println(152);
ps.println(25);
ps.println(30);
ps.println("Exit");
ps.flush();
clientConnection.close();
}
}
catch(Exception e)
{
System.out.println("problem with networking");
}
}
}
\ No newline at end of file
......@@ -22,8 +22,10 @@ import java.net.*;
*/
public class BlankenbekerMyTcpClient {
/** run the program
* @param args command-line arguments, string parameters (unused) */
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args)
{
try
......
......@@ -8,12 +8,6 @@ import java.net.*;
/**
*
* @author Brian
*/
public class HanleyTcpServer {
/**
* Very slightly more complex than example1. A complete copy of
* example 2. The only thing this does
......@@ -30,9 +24,14 @@ public class HanleyTcpServer {
* telnet [ipAddressOfServerLaptop] 2317
*
* And have him display the socket pairs he got.
* @param args command-line arguments, string parameters (unused)
* @author mcgredo
* @author Brian
*/
public class HanleyTcpServer {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args)
{
try
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package MV3500Cohort2018JanuaryMarch.homework1;
import java.io.*;
import java.net.*;
/**
*
* @author Rico
*/
public class LandasClient1 {
/**
* @param args command-line arguments
*/
public static void main(String[] args) {
try
{
System.out.println("Creating Socket");
Socket cs = new Socket("localhost", 2317);
while (true) {
PrintStream cp = new PrintStream(cs.getOutputStream());
System.out.print("\nClient: \n");
System.out.print("Please enter entity identifier and position: ");
InputStreamReader cir = new InputStreamReader(System.in);
BufferedReader cbr = new BufferedReader(cir);
String temp1 = cbr.readLine();
cp.println(temp1);
BufferedReader cbr1 = new BufferedReader(new InputStreamReader(cs.getInputStream()));
String temp2 = cbr1.readLine();
System.out.print(temp2);
}
}
catch(Exception e)
{
System.out.println(e);
System.out.println(" Problem with client");
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package MV3500Cohort2018JanuaryMarch.homework1;
import java.io.*;
import java.net.*;
/**
*
* @author Rico
*/
public class LandasClient1 {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
try
{
System.out.println("Creating Socket");
Socket cs = new Socket("localhost", 2317);
while (true) {
PrintStream cp = new PrintStream(cs.getOutputStream());
System.out.print("\nClient: \n");
System.out.print("Please enter entity identifier and position: ");
InputStreamReader cir = new InputStreamReader(System.in);
BufferedReader cbr = new BufferedReader(cir);
String temp1 = cbr.readLine();
cp.println(temp1);
BufferedReader cbr1 = new BufferedReader(new InputStreamReader(cs.getInputStream()));
String temp2 = cbr1.readLine();
System.out.print(temp2);
}
}
catch(Exception e)
{
System.out.println(e);
System.out.println(" Problem with client");
}
}
}
......@@ -20,6 +20,7 @@ public class LandasClient2 {
static DataOutputStream out;
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package MV3500Cohort2018JanuaryMarch.homework1;
import java.io.*;
import java.net.*;
/**
*
* @author Rico
*/
public class LandasServer1 {
/**
* @param args command-line arguments
*/
public static void main(String[] args) {
try
{
ServerSocket ss = new ServerSocket(2317);
while(true) {
Socket cs = ss.accept();
BufferedReader cbr = new BufferedReader(new InputStreamReader(cs.getInputStream()));
String temp = cbr.readLine();
//System.out.println("Client:" + temp);
//JOptionPane.showMessageDialog(null,"Salam");
PrintStream spr = new PrintStream(cs.getOutputStream());
String temp1 = "Server: I got your message: " + temp;
spr.println(temp1);
//server();
}
}
catch(Exception e) {
System.out.println("problem with networking");
}
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package MV3500Cohort2018JanuaryMarch.homework1;
import java.io.*;
import java.net.*;
/**
*
* @author Rico
*/
public class LandasServer1 {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
try
{
ServerSocket ss = new ServerSocket(2317);
while(true) {
Socket cs = ss.accept();
BufferedReader cbr = new BufferedReader(new InputStreamReader(cs.getInputStream()));
String temp = cbr.readLine();
//System.out.println("Client:" + temp);
//JOptionPane.showMessageDialog(null,"Salam");
PrintStream spr = new PrintStream(cs.getOutputStream());
String temp1 = "Server: I got your message: " + temp;
spr.println(temp1);
//server();
}
}
catch(Exception e) {
System.out.println("problem with networking");
}
}
}
package MV3500Cohort2018JanuaryMarch.homework1;
//package Assignment01;
import java.io.*;
import java.net.*;
/**
*
* @author Jeremiah Sasala
*/
public class SasalaClient {
/**
* @param args command-line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
while(true){
try
{
System.out.println("-------------------------------------------------------------------");
// from the server, instead of one only.
Socket socket = new Socket("127.0.0.1", 2317);
InputStream is = socket.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String serverMessage01 = br.readLine();
String serverMessage02 = br.readLine();
String serverMessage03 = br.readLine();
String serverMessage04 = br.readLine();
String serverMessage05 = br.readLine();
System.out.println("The message the server sent was . . . " + serverMessage01);
System.out.println("The message the server sent was . . . " + serverMessage02);
System.out.println("The message the server sent was . . . " + serverMessage03);
System.out.println("The message the server sent was . . . " + serverMessage04);
System.out.println("The message the server sent was . . . " + serverMessage05);
}
catch(Exception e)
{
System.out.println("Problem with client");
System.out.println(e);
}
}
}
}
//package Assignment01;
import java.io.*;
import java.net.*;
/**
*
* @author Jeremiah Sasala
*/
public class SasalaClient {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
while(true){
try
{
System.out.println("-------------------------------------------------------------------");
// from the server, instead of one only.
Socket socket = new Socket("127.0.0.1", 2317);
InputStream is = socket.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String serverMessage01 = br.readLine();
String serverMessage02 = br.readLine();
String serverMessage03 = br.readLine();
String serverMessage04 = br.readLine();
String serverMessage05 = br.readLine();
System.out.println("The message the server sent was . . . " + serverMessage01);
System.out.println("The message the server sent was . . . " + serverMessage02);
System.out.println("The message the server sent was . . . " + serverMessage03);
System.out.println("The message the server sent was . . . " + serverMessage04);
System.out.println("The message the server sent was . . . " + serverMessage05);
}
catch(Exception e)
{
System.out.println("Problem with client");
System.out.println(e);
}
}
}
}
......@@ -15,7 +15,8 @@ import java.net.UnknownHostException;
*/
public class SnellPositionClient {
/**
* @param args command-line arguments, must include hostname
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args)
{
......
......@@ -11,6 +11,7 @@ import java.io.PrintWriter;
public class SnellPositionServer {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args)
......
......@@ -18,6 +18,7 @@ public class LandasMulticastSender {
/** run the program
* @param args command-line arguments, string parameters (unused)
* @throws java.net.UnknownHostException bad address
* @throws java.lang.InterruptedException user cancels execution */
public static void main(String[] args) throws UnknownHostException, InterruptedException {
// address that we are connecting to
......
......@@ -19,6 +19,7 @@ public class LandasMulticastSender2 {
/**
* Program invocation, execution starts here
* @param args command-line arguments
* @throws java.net.UnknownHostException bad address
* @throws java.lang.InterruptedException user cancels execution
*/
public static void main(String[] args) throws UnknownHostException, InterruptedException {
......
......@@ -17,6 +17,7 @@ import java.net.Socket;
public class LoeffelmanAssignment1 {
/**
* Program invocation, execution starts here
* @param args command-line arguments
*/
public static void main(String[] args) {
......
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