package org.kne.cloud.network;

import java.io.IOException;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;

public class DefaultDatagramSocketFactory extends DatagramSocketFactory {

	@Override
	public DatagramSocket createSocket(String paramString, int paramInt) throws IOException, UnknownHostException {
		DatagramSocket dg=new DatagramSocket();
		dg.connect(new InetSocketAddress(paramString, paramInt));
		return dg;
	}

	@Override
	public DatagramSocket createSocket(InetAddress paramInetAddress, int paramInt) throws IOException {
		DatagramSocket dg=new DatagramSocket();
		dg.connect(paramInetAddress, paramInt);
		return dg;
	}

	@Override
	public DatagramSocket createSocket(String paramString, int paramInt1, InetAddress paramInetAddress, int paramInt2)
			throws IOException, UnknownHostException {
		DatagramSocket dg=new DatagramSocket(new InetSocketAddress(paramInetAddress, paramInt2));
		dg.connect(new InetSocketAddress(paramString, paramInt1));
		return dg;
	}

	@Override
	public DatagramSocket createSocket(InetAddress paramInetAddress1, int paramInt1, InetAddress paramInetAddress2,
			int paramInt2) throws IOException {
		DatagramSocket dg=new DatagramSocket(new InetSocketAddress(paramInetAddress2, paramInt2));
		dg.connect(paramInetAddress1, paramInt1);
		return dg;
	}

}
