/* SSLSocketFactoryImpl.java --
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
@Override public SSLSocketImpl createSocket(String host, int port)
throws IOException, UnknownHostException
{
- SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port);
- InetSocketAddress endpoint = new InetSocketAddress(host, port);
- socket.connect(endpoint);
- return socket;
+ return createSocket(host, port, null, 0);
}
/* (non-Javadoc)
InetAddress localHost, int localPort)
throws IOException, UnknownHostException
{
- SSLSocketImpl socket = createSocket(host, port);
+ SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port);
+ InetSocketAddress endpoint = new InetSocketAddress(host, port);
socket.bind(new InetSocketAddress(localHost, localPort));
+ socket.connect(endpoint);
return socket;
}
@Override public SSLSocketImpl createSocket(InetAddress host, int port)
throws IOException
{
- SSLSocketImpl socket = new SSLSocketImpl(contextImpl,
- host.getCanonicalHostName(), port);
- socket.connect(new InetSocketAddress(host, port));
- return socket;
+ return createSocket(host, port, null, 0);
}
/* (non-Javadoc)
InetAddress localHost, int localPort)
throws IOException
{
- SSLSocketImpl socket = createSocket(host, port);
+ SSLSocketImpl socket = new SSLSocketImpl(contextImpl,
+ host.getCanonicalHostName(), port);
socket.bind(new InetSocketAddress(localHost, localPort));
+ socket.connect(new InetSocketAddress(host, port));
return socket;
}
}