Example usage for java.net DatagramPacket setAddress

List of usage examples for java.net DatagramPacket setAddress

Introduction

In this page you can find the example usage for java.net DatagramPacket setAddress.

Prototype

public synchronized void setAddress(InetAddress iaddr) 

Source Link

Document

Sets the IP address of the machine to which this datagram is being sent.

Usage

From source file:org.opendaylight.lispflowmapping.integrationtest.MappingServiceIntegrationTest.java

License:asdf

private void initPacketAddress(DatagramPacket packet, int port) throws UnknownHostException {
    packet.setAddress(InetAddress.getByName(lispBindAddress));
    packet.setPort(port);//from   ww w  .  j  ava  2 s. c o m
}