Check - return false}else return true public static boolean...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** * @(#) * */ import*; import*; import java.lang.*; import java.util.*; i public class Check { p public static boolean validatePort(DatagramPacket p, int port, InetAddress ip){ int clientPort=p.getPort(); InetAddress clientAddress=p.getAddress(); if (clientPort!=port || !clientAddress.equals(ip) ){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return false; }else{ return true; } } public static boolean validateServer(DatagramPacket p, InetAddress ip){ InetAddress serverAddress=p.getAddress(); if (!serverAddress.equals(ip) ){ return false; }else{ return true; } } }...
View Full Document

This note was uploaded on 09/26/2009 for the course SCE Sysc3303 taught by Professor Marshall during the Summer '09 term at Carleton CA.

Ask a homework question - tutors are online