1 17 18 package org.apache.avalon.cornerstone.blocks.sockets; 19 20 import java.io.IOException ; 21 import java.net.InetAddress ; 22 import java.net.Socket ; 23 import org.apache.avalon.cornerstone.services.sockets.SocketFactory; 24 25 30 public class DefaultSocketFactory 31 implements SocketFactory 32 { 33 41 public Socket createSocket( final InetAddress address, final int port ) 42 throws IOException 43 { 44 return new Socket ( address, port ); 45 } 46 47 58 public Socket createSocket( final InetAddress address, 59 final int port, 60 final InetAddress localAddress, 61 final int localPort ) 62 throws IOException 63 { 64 return new Socket ( address, port, localAddress, localPort ); 65 } 66 } 67 | Popular Tags |