primitive
Class SockHost

java.lang.Object
  extended byprimitive.SockHost

public class SockHost
extends java.lang.Object

SockHost.java This class encapsulates a Socket into an Object which gives easy access to its destination IP address and port.

Author:
Avi TODO MAY NOT BE NEEDED !! AMEND!

Constructor Summary
SockHost(Socket sock, int port, java.lang.String destIP)
          Contstructor for class SockHost which takes the Socket to be represented the port of the Socket and the destination IP of the Socket.
 
Method Summary
 java.lang.String getdestIP()
          Get the destination IP of the Socket represented
 int getPort()
          Get the port of the Socket represented
 Socket getSocket()
          Get the Socket represented by this class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SockHost

public SockHost(Socket sock,
                int port,
                java.lang.String destIP)
Contstructor for class SockHost which takes the Socket to be represented the port of the Socket and the destination IP of the Socket.

Parameters:
sock - The Socket to be represented.
port - The port of the Socket.
destIP - The destination IP of the Socket.
Method Detail

getPort

public int getPort()
Get the port of the Socket represented

Returns:
Port number

getdestIP

public java.lang.String getdestIP()
Get the destination IP of the Socket represented

Returns:
Destination IP Address

getSocket

public Socket getSocket()
Get the Socket represented by this class.

Returns:
The Socket represented by this class.