You are on page 1of 1

c=dis.

read();

Scanner sc=new Scanner(System.in);

a=new int[c];

System.out.println("Enter "+c+" frames: ");

for(int i=0;i<c;i++){

a[i]=sc.nextInt();

dos.write(a[i]);

dos.flush();

System.out.println("The number of packets sent is:" + a.length);

int y = a.length;

dos.write(y);

dos.flush();

int k = dis.read();

System.out.println("Resending frame "+(k+1)+" again..");

f=a[k];

dos.write(f);

dos.flush();

System.out.println("Quiting");

catch (IOException e) {

System.out.println(e);

finally {

try {

dis.close();

You might also like