private final void close(Throwable t) { CloseReason cr; if (t instanceof WsIOException) { cr = ((WsIOException) t).getCloseReason(); } else { cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, t.getMessage()); } try { wsSession.close(cr); } catch (IOException ignore) { // Ignore } }
private final void close(Throwable t) { CloseReason cr; if (t instanceof WsIOException) { cr = ((WsIOException) t).getCloseReason(); } else { cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, t.getMessage()); } try { wsSession.close(cr); } catch (IOException ignore) { // Ignore } }
private final void close(Throwable t) { CloseReason cr; if (t instanceof WsIOException) { cr = ((WsIOException) t).getCloseReason(); } else { cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, t.getMessage()); } try { wsSession.close(cr); } catch (IOException ignore) { // Ignore } }
private final void close(Throwable t) { changeReadState(ReadState.CLOSING); CloseReason cr; if (t instanceof WsIOException) { cr = ((WsIOException) t).getCloseReason(); } else { cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, t.getMessage()); } try { wsSession.close(cr); } catch (IOException ignore) { // Ignore } }
@Override public void onDataAvailable() { try { wsFrame.onDataAvailable(); } catch (WsIOException ws) { wsProtocolHandler.close(ws.getCloseReason()); } catch (IOException ioe) { onError(ioe); CloseReason cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, ioe.getMessage()); wsProtocolHandler.close(cr); } }
private final void close(Throwable t) { changeReadState(ReadState.CLOSING); CloseReason cr; if (t instanceof WsIOException) { cr = ((WsIOException) t).getCloseReason(); } else { cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, t.getMessage()); } try { wsSession.close(cr); } catch (IOException ignore) { // Ignore } }
@Override public void onDataAvailable() { try { wsFrame.onDataAvailable(); } catch (WsIOException ws) { wsProtocolHandler.close(ws.getCloseReason()); } catch (EOFException eof) { CloseReason cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, eof.getMessage()); wsProtocolHandler.close(cr); } catch (IOException ioe) { onError(ioe); CloseReason cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, ioe.getMessage()); wsProtocolHandler.close(cr); } }
@Override public void onDataAvailable() { try { wsFrame.onDataAvailable(); } catch (WsIOException ws) { wsProtocolHandler.close(ws.getCloseReason()); } catch (EOFException eof) { CloseReason cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, eof.getMessage()); wsProtocolHandler.close(cr); } catch (IOException ioe) { onError(ioe); CloseReason cr = new CloseReason( CloseCodes.CLOSED_ABNORMALLY, ioe.getMessage()); wsProtocolHandler.close(cr); } }
return wsFrame.notifyDataAvailable(); } catch (WsIOException ws) { close(ws.getCloseReason()); } catch (IOException ioe) { onError(ioe);
return wsFrame.notifyDataAvailable(); } catch (WsIOException ws) { close(ws.getCloseReason()); } catch (IOException ioe) { onError(ioe);
return wsFrame.notifyDataAvailable(); } catch (WsIOException ws) { close(ws.getCloseReason()); } catch (IOException ioe) { onError(ioe);