Here you can find the source of createServer(final String host, final int port)
public static DatagramSocket createServer(final String host, final int port) throws SocketException
//package com.java2s; //License from project: Apache License import java.net.DatagramSocket; import java.net.InetSocketAddress; import java.net.SocketException; public class Main { public static DatagramSocket createServer(final String host, final int port) throws SocketException { return new DatagramSocket(new InetSocketAddress(host, port)); }/*w w w .j av a 2 s. c om*/ }