public class WebSocketSession extends HttpSession
Session.ArrayQueueItem, Session.QueueItem| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VERSION_13 |
FIN, fragment, fragmentLength, handling, parsing, pipeline, requestBodyOffsetACTIVE, closing, CLOSING, EVENT_MASK, events, eventsToListen, IDLE, lastAccessTime, log, queueHead, READABLE, selector, slot, socket, SSL, STALE, wasSelected, WRITEABLE| Constructor and Description |
|---|
WebSocketSession(Socket socket,
WebSocketServer server,
WebSocketServerConfig config) |
| Modifier and Type | Method and Description |
|---|---|
int |
checkStatus(long currentTime,
long keepAlive) |
void |
close() |
void |
close(short code) |
protected Extension |
createExtension(ExtensionRequest request) |
protected Response |
createResponse(Request request) |
void |
handleException(java.lang.Throwable e) |
protected void |
handleMessage(WebSocketSession session,
Message<?> message) |
void |
handshake(Request request) |
protected void |
processExtensions(Request request,
Response response) |
protected void |
processProtocol(Request request,
Response response) |
protected void |
processRead(byte[] buffer) |
void |
sendMessage(Message<?> message) |
protected void |
validateRequest(Request request) |
getMaxRequestBodyLength, handleParsedRequest, handleSocketClosed, parseRequest, processHttpBuffer, sendError, sendResponse, startParsingRequestBody, writeResponsegetQueueStats, getRemoteHost, isSsl, lastAccessTime, listen, process, processWrite, read, readRaw, scheduleClose, socket, write, write, writepublic static final java.lang.String VERSION_13
public WebSocketSession(Socket socket, WebSocketServer server, WebSocketServerConfig config)
public int checkStatus(long currentTime,
long keepAlive)
checkStatus in class HttpSessionprotected void processRead(byte[] buffer)
throws java.io.IOException
processRead in class HttpSessionjava.io.IOExceptionpublic void handshake(Request request) throws java.io.IOException
java.io.IOExceptionpublic void sendMessage(Message<?> message) throws java.io.IOException
java.io.IOExceptionprotected void handleMessage(WebSocketSession session, Message<?> message) throws java.io.IOException
java.io.IOExceptionpublic void handleException(java.lang.Throwable e)
handleException in class Sessionpublic void close(short code)
public void close()
protected void validateRequest(Request request)
protected Extension createExtension(ExtensionRequest request)