public final class WebSocketServer extends org.nanohttpd.protocols.websockets.NanoWSD implements InspectorWSConnection
HEADER_CONNECTION, HEADER_CONNECTION_VALUE, HEADER_UPGRADE, HEADER_UPGRADE_VALUE, HEADER_WEBSOCKET_ACCEPT, HEADER_WEBSOCKET_KEY, HEADER_WEBSOCKET_PROTOCOL, HEADER_WEBSOCKET_VERSION, HEADER_WEBSOCKET_VERSION_VALUE, LOGasyncRunner, CONTENT_DISPOSITION_ATTRIBUTE_PATTERN, CONTENT_DISPOSITION_ATTRIBUTE_REGEX, CONTENT_DISPOSITION_PATTERN, CONTENT_DISPOSITION_REGEX, CONTENT_TYPE_PATTERN, CONTENT_TYPE_REGEX, hostname, interceptors, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, myPort, SOCKET_READ_TIMEOUT| Modifier and Type | Method and Description |
|---|---|
void |
close(String wspath)
Close the web socket server on the specific path.
|
void |
consoleAPICall(String wsspath,
String type,
Object text) |
protected org.nanohttpd.protocols.http.ClientHandler |
createClientHandler(Socket finalAccept,
InputStream inputStream) |
static WebSocketServer |
get(InetSocketAddress isa,
String path,
InspectorExecutionContext context,
boolean debugBrk,
boolean secure,
KeyStoreOptions keyStoreOptions,
ConnectionWatcher connectionWatcher,
InspectServerSession initialSession) |
int |
getPort() |
protected org.nanohttpd.protocols.websockets.WebSocket |
openWebSocket(org.nanohttpd.protocols.http.IHTTPSession handshake) |
void |
stop() |
handleWebSocket, isWebsocketRequested, makeAcceptKeyaddHTTPInterceptor, closeAllConnections, createServerRunnable, decodeParameters, decodeParameters, decodePercent, getHostname, getListeningPort, getMimeTypeForFile, getMyServerSocket, getServerSocketFactory, getTempFileManagerFactory, handle, isAlive, makeSecure, makeSSLSocketFactory, makeSSLSocketFactory, makeSSLSocketFactory, mimeTypes, safeClose, setAsyncRunner, setHTTPHandler, setServerSocketFactory, setTempFileManagerFactory, start, start, start, wasStartedpublic static WebSocketServer get(InetSocketAddress isa, String path, InspectorExecutionContext context, boolean debugBrk, boolean secure, KeyStoreOptions keyStoreOptions, ConnectionWatcher connectionWatcher, InspectServerSession initialSession) throws IOException
IOExceptionprotected org.nanohttpd.protocols.websockets.WebSocket openWebSocket(org.nanohttpd.protocols.http.IHTTPSession handshake)
openWebSocket in class org.nanohttpd.protocols.websockets.NanoWSDprotected org.nanohttpd.protocols.http.ClientHandler createClientHandler(Socket finalAccept, InputStream inputStream)
createClientHandler in class org.nanohttpd.protocols.http.NanoHTTPDpublic int getPort()
getPort in interface InspectorWSConnectionpublic void close(String wspath) throws IOException
ConnectionWatcher.waitForClose() is done.close in interface InspectorWSConnectionIOExceptionpublic void consoleAPICall(String wsspath, String type, Object text)
consoleAPICall in interface InspectorWSConnectionpublic void stop()
stop in class org.nanohttpd.protocols.http.NanoHTTPD