public void run() { // Process the request from this socket if (!setSocketOptions(socket) || !handler.process(socket)) { // Close socket try { socket.close(); } catch (IOException e) { } } // Finish up this request socket = null; }
public void run() { // Process the request from this socket if (!setSocketOptions(socket) || (handler.process(socket) == Handler.SocketState.CLOSED)) { // Close socket try { socket.close(); } catch (IOException e) { } } // Finish up this request socket = null; }
public void run() { // Process the request from this socket if (!setSocketOptions(socket) || (handler.process(socket) == Handler.SocketState.CLOSED)) { // Close socket try { socket.close(); } catch (IOException e) { } } // Finish up this request socket = null; }
/** * The background thread that listens for incoming TCP/IP connections and * hands them off to an appropriate processor. */ public void run() { // Process requests until we receive a shutdown signal while (running) { // Wait for the next socket to be assigned Socket socket = await(); if (socket == null) continue; // Process the request from this socket if (!setSocketOptions(socket) || !handler.process(socket)) { // Close socket try { socket.close(); } catch (IOException e) { } } // Finish up this request socket = null; recycleWorkerThread(this); } }
} else if ((status == null) && (!setSocketOptions(socket) || (handler.process(socket) == Handler.SocketState.CLOSED))) {
} else if ((status == null) && (!setSocketOptions(socket) || (handler.process(socket) == Handler.SocketState.CLOSED))) {
if (running && !paused && setSocketOptions(socket)) {
if (running && !paused && setSocketOptions(socket)) {
if (running && !paused && setSocketOptions(socket)) {