public class ComboxUtils
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ComboxUtils.PreOperation
Should be used as parameter for
#createServerSocket(int, PreOperation) } |
| Constructor and Description |
|---|
ComboxUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.net.ServerSocket |
createServerSocket(int port,
ComboxUtils.PreOperation op,
boolean upnp)
Try to create a ServerSocket on the specified port.
|
public static java.net.ServerSocket createServerSocket(int port,
ComboxUtils.PreOperation op,
boolean upnp)
throws java.io.IOException
port - if 0 the port will be choose randomly or sequentially from
Configuration.allocatePortRangeop - an operation to perform on the server socket before its binding.
ex: ServerSocket.setReceiveBufferSize(int)java.io.IOException - If we specify a port but we can't bind the address