public abstract class NanoWSD extends NanoHTTPD
| Modifier and Type | Class and Description |
|---|---|
static class |
NanoWSD.State |
static class |
NanoWSD.WebSocket |
static class |
NanoWSD.WebSocketException |
static class |
NanoWSD.WebSocketFrame |
NanoHTTPD.AsyncRunner, NanoHTTPD.ClientHandler, NanoHTTPD.ContentType, NanoHTTPD.Cookie, NanoHTTPD.CookieHandler, NanoHTTPD.DefaultAsyncRunner, NanoHTTPD.DefaultServerSocketFactory, NanoHTTPD.DefaultTempFile, NanoHTTPD.DefaultTempFileManager, NanoHTTPD.HTTPSession, NanoHTTPD.IHTTPSession, NanoHTTPD.Method, NanoHTTPD.Response, NanoHTTPD.ResponseException, NanoHTTPD.SecureServerSocketFactory, NanoHTTPD.ServerRunnable, NanoHTTPD.ServerSocketFactory, NanoHTTPD.TempFile, NanoHTTPD.TempFileManager, NanoHTTPD.TempFileManagerFactory| Modifier and Type | Field and Description |
|---|---|
static String |
HEADER_CONNECTION |
static String |
HEADER_CONNECTION_VALUE |
static String |
HEADER_UPGRADE |
static String |
HEADER_UPGRADE_VALUE |
static String |
HEADER_WEBSOCKET_ACCEPT |
static String |
HEADER_WEBSOCKET_KEY |
static String |
HEADER_WEBSOCKET_PROTOCOL |
static String |
HEADER_WEBSOCKET_VERSION |
static String |
HEADER_WEBSOCKET_VERSION_VALUE |
asyncRunner, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, SOCKET_READ_TIMEOUT| Constructor and Description |
|---|
NanoWSD(int port) |
NanoWSD(String hostname,
int port) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isWebsocketRequested(NanoHTTPD.IHTTPSession session) |
static String |
makeAcceptKey(String key) |
protected abstract NanoWSD.WebSocket |
openWebSocket(NanoHTTPD.IHTTPSession handshake) |
NanoHTTPD.Response |
serve(NanoHTTPD.IHTTPSession session) |
protected NanoHTTPD.Response |
serveHttp(NanoHTTPD.IHTTPSession session) |
protected boolean |
useGzipWhenAccepted(NanoHTTPD.Response r)
not all websockets implementations accept gzip compression.
|
closeAllConnections, createClientHandler, createServerRunnable, decodeParameters, decodeParameters, decodePercent, getHostname, getListeningPort, getMimeTypeForFile, getServerSocketFactory, getTempFileManagerFactory, isAlive, makeSecure, makeSSLSocketFactory, makeSSLSocketFactory, makeSSLSocketFactory, mimeTypes, newChunkedResponse, newFixedLengthResponse, newFixedLengthResponse, newFixedLengthResponse, serve, setAsyncRunner, setServerSocketFactory, setTempFileManagerFactory, start, start, start, stop, wasStartedpublic static final String HEADER_UPGRADE
public static final String HEADER_UPGRADE_VALUE
public static final String HEADER_CONNECTION
public static final String HEADER_CONNECTION_VALUE
public static final String HEADER_WEBSOCKET_VERSION
public static final String HEADER_WEBSOCKET_VERSION_VALUE
public static final String HEADER_WEBSOCKET_KEY
public static final String HEADER_WEBSOCKET_ACCEPT
public static final String HEADER_WEBSOCKET_PROTOCOL
public NanoWSD(int port)
public NanoWSD(String hostname, int port)
public static String makeAcceptKey(String key) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionprotected boolean isWebsocketRequested(NanoHTTPD.IHTTPSession session)
protected abstract NanoWSD.WebSocket openWebSocket(NanoHTTPD.IHTTPSession handshake)
public NanoHTTPD.Response serve(NanoHTTPD.IHTTPSession session)
protected NanoHTTPD.Response serveHttp(NanoHTTPD.IHTTPSession session)
protected boolean useGzipWhenAccepted(NanoHTTPD.Response r)
useGzipWhenAccepted in class NanoHTTPDCopyright © 2012–2016 nanohttpd. All rights reserved.