summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/javax/net
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-09-28 19:36:39 -0700
committerJesse Wilson <jessewilson@google.com>2010-09-28 19:36:39 -0700
commit4d743816cad738bfeccf6dc210fc7c9bd84a8777 (patch)
treeac006911433f05d1d8ffee194fa9942c524839fc /luni/src/main/java/javax/net
parent1f8243e3d2b5a3f8e0398c304d1dea0395cbc368 (diff)
downloadlibcore-4d743816cad738bfeccf6dc210fc7c9bd84a8777.zip
libcore-4d743816cad738bfeccf6dc210fc7c9bd84a8777.tar.gz
libcore-4d743816cad738bfeccf6dc210fc7c9bd84a8777.tar.bz2
Tests for ServerSocketFactory.getDefault().
Motivated by http://b/2587385 Change-Id: If30898859f869c88342d1069a2425575752ebf6e
Diffstat (limited to 'luni/src/main/java/javax/net')
-rw-r--r--luni/src/main/java/javax/net/ServerSocketFactory.java31
1 files changed, 13 insertions, 18 deletions
diff --git a/luni/src/main/java/javax/net/ServerSocketFactory.java b/luni/src/main/java/javax/net/ServerSocketFactory.java
index f2d2c0d..15ab773 100644
--- a/luni/src/main/java/javax/net/ServerSocketFactory.java
+++ b/luni/src/main/java/javax/net/ServerSocketFactory.java
@@ -64,10 +64,10 @@ public abstract class ServerSocketFactory {
}
/**
- * Creates a new server socket which is bound to the given port.
+ * Creates a new server socket which is bound to the given port with a
+ * maximum backlog of 50 unaccepted connections.
*
- * @param port
- * the port on which the created socket has to listen.
+ * @param port the port on which the created socket has to listen.
* @return the created bound server socket.
* @throws IOException
* if an error occurs while creating a new server socket.
@@ -78,13 +78,11 @@ public abstract class ServerSocketFactory {
* Creates a new server socket which is bound to the given port and
* configures its maximum of queued connections.
*
- * @param port
- * the port on which the created socket has to listen.
- * @param backlog
- * the maximum of queued connections.
+ * @param port the port on which the created socket has to listen.
+ * @param backlog the maximum number of unaccepted connections. Passing 0 or
+ * a negative value yields the default backlog of 50.
* @return the created bound server socket.
- * @throws IOException
- * if an error occurs while creating a new server socket.
+ * @throws IOException if an error occurs while creating a new server socket.
*/
public abstract ServerSocket createServerSocket(int port, int backlog) throws IOException;
@@ -92,16 +90,13 @@ public abstract class ServerSocketFactory {
* Creates a new server socket which is bound to the given address on the
* specified port and configures its maximum of queued connections.
*
- * @param port
- * the port on which the created socket has to listen.
- * @param backlog
- * the maximum of queued connections.
- * @param iAddress
- * the address of the network interface which is used by the
- * created socket.
+ * @param port the port on which the created socket has to listen.
+ * @param backlog the maximum number of unaccepted connections. Passing 0 or
+ * a negative value yields the default backlog of 50.
+ * @param iAddress the address of the network interface which is used by the
+ * created socket.
* @return the created bound server socket.
- * @throws IOException
- * if an error occurs while creating a new server socket.
+ * @throws IOException if an error occurs while creating a new server socket.
*/
public abstract ServerSocket createServerSocket(int port, int backlog, InetAddress iAddress)
throws IOException;