try {
final int port = argPort.isSet() ? argPort.getValue() : DEFAULT_PORT;
final InetAddress addr = argAddress.getAsInetAddress();
final SocketAddress sockAddr = new InetSocketAddress(addr, port);
final boolean udp = argUdp.isSet();
OutputStream remoteOut = udp ? new UDPOutputStream(sockAddr) :
createTCPOutputStream(addr, port);
Writer remoteWriter = new OutputStreamWriter(remoteOut);
try {
ShellUtils.getCurrentShell().addConsoleOuputRecorder(remoteWriter);
} catch (UnsupportedOperationException ex) {