Package com.iizix.comm
Class WebSocketServerComm
java.lang.Object
com.iizix.comm.WebSocketServerComm
This class handles a Server Socket NIO implementation into a single-threaded Worker that accepts Socket connections in a non-blocking mode. When a socket connection is establishes to this server socket, it is assumed to have a HTTP header that matches the WebSocket protocol. All other HTTP requests are rejected.
- Author:
- Christopher Mindus
- Nested Class SummaryNested Classes
- Constructor SummaryConstructorsConstructorDescription- WebSocketServerComm- (WebSocketServerCommProps properties, Worker worker, TransactionCommListener listener, WebSocketAcceptor acceptor) Constructs the WebSocket Server communication engine for the worker in question.- WebSocketServerComm- (WebSocketServerCommProps properties, Worker worker, WebSocketCommListener listener, WebSocketAcceptor acceptor) Constructs the WebSocket Server communication engine for the worker in question.
- Method Summary
- Constructor Details- WebSocketServerCommpublic WebSocketServerComm- (WebSocketServerCommProps properties, Worker worker, TransactionCommListener listener, WebSocketAcceptor acceptor) Constructs the WebSocket Server communication engine for the worker in question.
- WebSocketServerCommpublic WebSocketServerComm- (WebSocketServerCommProps properties, Worker worker, WebSocketCommListener listener, WebSocketAcceptor acceptor) Constructs the WebSocket Server communication engine for the worker in question.
 
- Method Details- openOpens the server socket with an unused port within the specified range.- Throws:
- WebSocketException- If the ServerSocket is already open, or if no socket was found available.
 
- getStateGets the state of the server socket.
- closepublic boolean close()Closes this server socket.- Returns:
- true for successful close, false otherwise.