| RMITCPClientSocketFactory.java |
1 /*
2 * @(#) $Id: RMITCPClientSocketFactory.java,v 1.2 2003/07/08 08:13:53 pankaj Exp $
3 *
4 * Copyright (c) 2002-03 by Pankaj Kumar (http://www.pankaj-k.net).
5 * All rights reserved.
6 *
7 * The license governing the use of this file can be found in the
8 * root directory of the containing software.
9 */
10package org.jstk.ssl;
11
12import java.io.IOException;
13import java.io.Serializable;
14import java.net.Socket;
15import java.rmi.server.RMIClientSocketFactory;
16
17public class RMITCPClientSocketFactory implements RMIClientSocketFactory, Serializable {
18 public Socket createSocket(String host, int port) throws IOException {
19 int outPort = ClientCommand.getOutPort();
20 if (outPort != -1)
21 port = outPort;
22 Socket socket = new Socket(host, port);
23 return socket;
24 }
25}
26