public void bind(InetAddress host,int port) throws IOException {
  if (socket != null)   socket.close();
  InetSocketAddress newAddr=new InetSocketAddress(host.getHostAddress(),port);
  this.socket=new DatagramSocket(newAddr);
}

public void bind ( InetAddress host , int port ) throws IOException { if ( socket != null ) socket . close ( ) ; InetSocketAddress newAddr = new InetSocketAddress ( host . getHostAddress ( ) , port ) ; this . socket = new DatagramSocket ( newAddr ) ; }
binds this socket to the specified port number on the specified host .
