public void run() {
		
		printMessage("Started.");
		while(true) {
			// Low-level stream set, reception of the message.
			try {

				Message m = in.readMessage(false, hostingDaId);
				if(m.isReliabilityFlagSet()) {
					in.ack(m.getRecipient(), hostingDaId);
				}
				
				handleMessage(m);
				
				if(isStopped()) {
					printMessage("Stream closed.");
					break;
				}

			} catch (SocketTimeoutException e) {

				if(isStopped()) {
					printMessage("Stream closed.");
					break;
				} else {
					printMessage("TO but stream not closed");
					continue;
				}

			} catch (EOFException e) {

				printMessage("Stream remotely closed.");
				break;

			} catch (IOException e) {

				printMessage("Error while reading next message: ");
				printMessage(e);
				break;

			} catch (OutOfSyncException e) {

				printMessage("Stream to "+remoteDaId+" out of sync.");
				printMessage(e);
				break;

			} catch (Throwable t) {

				printMessage("Signaling error " + t);
				com.signalChildError(t, "MessageInputStream for remote DA "+
						remoteDaId);
				break;

			}

		} /* while */

		exit();

	}