jdk/src/share/classes/javax/net/ServerSocketFactory.java
author never
Mon, 12 Jul 2010 22:27:18 -0700
changeset 5926 a36f90d986b6
parent 5506 202f599c92aa
permissions -rw-r--r--
6968385: malformed xml in sweeper logging Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.net;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
import java.io.IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.net.InetAddress;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.net.ServerSocket;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.net.SocketException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * This class creates server sockets.  It may be subclassed by other
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * factories, which create particular types of server sockets.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * provides a general framework for the addition of public socket-level
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * functionality.  It is the server side analogue of a socket factory,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * and similarly provides a way to capture a variety of policies related
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * to the sockets being constructed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * <P> Like socket factories, server Socket factory instances have
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * methods used to create sockets. There is also an environment
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * specific default server socket factory; frameworks will often use
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * their own customized factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * @see SocketFactory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * @author David Brownell
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
public abstract class ServerSocketFactory
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    // NOTE:  JDK 1.1 bug in class GC, this can get collected
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    // even though it's always accessible via getDefault().
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    private static ServerSocketFactory          theFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
     * Creates a server socket factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    protected ServerSocketFactory() { /* NOTHING */ }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
     * Returns a copy of the environment's default socket factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
     * @return the <code>ServerSocketFactory</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    public static ServerSocketFactory getDefault()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
        synchronized (ServerSocketFactory.class) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
            if (theFactory == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
                //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
                // Different implementations of this method could
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
                // work rather differently.  For example, driving
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
                // this from a system property, or using a different
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                // implementation than JavaSoft's.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
                //
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
                theFactory = new DefaultServerSocketFactory();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
        return theFactory;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * Returns an unbound server socket.  The socket is configured with
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * the socket options (such as accept timeout) given to this factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     * @return the unbound socket
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
     * @throws IOException if the socket cannot be created
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
     * @see java.net.ServerSocket#bind(java.net.SocketAddress)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
     * @see java.net.ServerSocket#bind(java.net.SocketAddress, int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
     * @see java.net.ServerSocket#ServerSocket()
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
    public ServerSocket createServerSocket() throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        throw new SocketException("Unbound server sockets not implemented");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
     * Returns a server socket bound to the specified port.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
     * The socket is configured with the socket options
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
     * (such as accept timeout) given to this factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
     * If there is a security manager, its <code>checkListen</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
     * method is called with the <code>port</code> argument as its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
     * argument to ensure the operation is allowed. This could result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
     * in a SecurityException.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
     * @param port the port to listen to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
     * @return the <code>ServerSocket</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
     * @throws IOException for networking errors
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * @throws SecurityException if a security manager exists and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     *         <code>checkListen</code> method doesn't allow the operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * @throws IllegalArgumentException if the port parameter is outside the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     *         specified range of valid port values, which is between 0 and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     *         65535, inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
     * @see    SecurityManager#checkListen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
     * @see java.net.ServerSocket#ServerSocket(int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    public abstract ServerSocket createServerSocket(int port)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
        throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
     * Returns a server socket bound to the specified port, and uses the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
     * specified connection backlog.  The socket is configured with
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
     * the socket options (such as accept timeout) given to this factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
     * The <code>backlog</code> argument must be a positive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
     * value greater than 0. If the value passed if equal or less
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
     * than 0, then the default value will be assumed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
     * If there is a security manager, its <code>checkListen</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
     * method is called with the <code>port</code> argument as its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
     * argument to ensure the operation is allowed. This could result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
     * in a SecurityException.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * @param port the port to listen to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * @param backlog how many connections are queued
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * @return the <code>ServerSocket</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * @throws IOException for networking errors
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * @throws SecurityException if a security manager exists and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     *         <code>checkListen</code> method doesn't allow the operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * @throws IllegalArgumentException if the port parameter is outside the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     *         specified range of valid port values, which is between 0 and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     *         65535, inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     * @see    SecurityManager#checkListen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @see java.net.ServerSocket#ServerSocket(int, int)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    public abstract ServerSocket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    createServerSocket(int port, int backlog)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * Returns a server socket bound to the specified port,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     * with a specified listen backlog and local IP.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
     * The <code>ifAddress</code> argument can be used on a multi-homed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
     * host for a <code>ServerSocket</code> that will only accept connect
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
     * requests to one of its addresses. If <code>ifAddress</code> is null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * it will accept connections on all local addresses. The socket is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * configured with the socket options (such as accept timeout) given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * to this factory.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * The <code>backlog</code> argument must be a positive
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     * value greater than 0. If the value passed if equal or less
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * than 0, then the default value will be assumed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * <P>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     * If there is a security manager, its <code>checkListen</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * method is called with the <code>port</code> argument as its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     * argument to ensure the operation is allowed. This could result
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * in a SecurityException.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * @param port the port to listen to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     * @param backlog how many connections are queued
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     * @param ifAddress the network interface address to use
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
     * @return the <code>ServerSocket</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
     * @throws IOException for networking errors
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
     * @throws SecurityException if a security manager exists and its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     *         <code>checkListen</code> method doesn't allow the operation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * @throws IllegalArgumentException if the port parameter is outside the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     *         specified range of valid port values, which is between 0 and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     *         65535, inclusive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * @see    SecurityManager#checkListen
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * @see java.net.ServerSocket#ServerSocket(int, int, java.net.InetAddress)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    public abstract ServerSocket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    createServerSocket(int port, int backlog, InetAddress ifAddress)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
// The default factory has NO intelligence.  In fact it's not clear
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
// what sort of intelligence servers need; the onus is on clients,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
// who have to know how to tunnel etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
//
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
class DefaultServerSocketFactory extends ServerSocketFactory {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    DefaultServerSocketFactory()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        /* NOTHING */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    public ServerSocket createServerSocket()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
        return new ServerSocket();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    public ServerSocket createServerSocket(int port)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        return new ServerSocket(port);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    public ServerSocket createServerSocket(int port, int backlog)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        return new ServerSocket(port, backlog);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    public ServerSocket
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
    createServerSocket(int port, int backlog, InetAddress ifAddress)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
    throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
        return new ServerSocket(port, backlog, ifAddress);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
}