
io.socket.engineio.server.EngineIoServerOptions Maven / Gradle / Ivy
package io.socket.engineio.server;
import io.socket.engineio.server.parser.Packet;
import java.util.concurrent.ScheduledExecutorService;
/**
* Options for {@link EngineIoServer}
*/
@SuppressWarnings({"WeakerAccess", "UnusedReturnValue"})
public final class EngineIoServerOptions {
/**
* The default options used by server.
* This instance is locked and cannot be modified.
*
* ping timeout: 5000
* ping interval: 25000
* allowed origins: *
*/
public static final EngineIoServerOptions DEFAULT = new EngineIoServerOptions();
/**
* Specify that all origins are to be allowed for CORS
*/
public static final String[] ALLOWED_CORS_ORIGIN_ALL = null;
/**
* Specify that no origins are allowed for CORS
*/
public static final String[] ALLOWED_CORS_ORIGIN_NONE = new String[0];
static {
DEFAULT.setCorsHandlingDisabled(false);
DEFAULT.setPingTimeout(20000);
DEFAULT.setPingInterval(25000);
DEFAULT.setAllowedCorsOrigins(ALLOWED_CORS_ORIGIN_ALL);
DEFAULT.setMaxTimeoutThreadPoolSize(20);
DEFAULT.lock();
}
private boolean mIsLocked;
private boolean mCorsHandlingDisabled;
private boolean mAllowSyncPolling;
private long mPingInterval;
private long mPingTimeout;
private String[] mAllowedCorsOrigins;
private Packet
© 2015 - 2025 Weber Informatics LLC | Privacy Policy