src/main/java/pityoulish/sockets/server/SimplisticSocketHandler.java
public ProtocolException cancelRequest(String reason,
                                         Throwable cause,
                                         Socket sock)
  {
    ProtocolException result = new ProtocolException(reason, cause);
    // don't log yet, suppressed exceptions might be added

    sendErrorAndClose(result, sock);
    Log.log(logger, "SocketHandler", result);

    return result;
  }
/**
   * Cancels a request.
   * The connected socket will be closed. An exception is returned and
   * can be thrown by the caller. Depending on the arguments, this
   * method may try to send an error response back to the client before
   * closing the socket.
   *
   * @param reason      the reason for cancelling this request
   * @param cause       an exception that causes cancelling of this request,
   *                    or <code>null</code>
   * @param sock        the socket from which the cancelled request
   *                    was received, or <code>null</code>
   *
   * @return    an exception with the given <code>reason</code> and
   *            <code>cause</code>, to be thrown by the caller
   */
Cancels a request.
The connected socket will be closed. An exception is returned and
can be thrown by the caller. Depending on the arguments, this
method may try to send an error response back to the client before
closing the socket.

@param reason      the reason for cancelling this request
@param cause       an exception that causes cancelling of this request,
or null
@param sock        the socket from which the cancelled request
was received, or null

@return    an exception with the given reason and
cause, to be thrown by the caller
Cancels a request . The connected socket will be closed . An exception is returned and can be thrown by the caller . Depending on the arguments this method may try to send an error response back to the client before closing the socket . @param reason the reason for cancelling this request @param cause an exception that causes cancelling of this request or null @param sock the socket from which the cancelled request was received or null @return an exception with the given reason and cause to be thrown by the caller
public ProtocolException cancelRequest(String reason,
                                         Throwable cause,
                                         Socket sock)
  {
    ProtocolException result = new ProtocolException(reason, cause);
    sendErrorAndClose(result, sock);
    Log.log(logger, "SocketHandler", result);
    return result;
  }
public ProtocolException cancelRequest ( String reason , Throwable cause , Socket sock ) { ProtocolException result = new ProtocolException ( reason , cause ) ; sendErrorAndClose ( result , sock ) ; Log . log ( logger , "SocketHandler" , result ) ; return result ; }
Cancels a request.
Cancels a request .
// don't log yet, suppressed exceptions might be added