@Override
	public void executeTask() {

		try {
			m_SendingSocket = new ServerSocket(LISTEN_PORT);
		} catch (IOException e2) {
			LISTEN_PORT += 1;
			executeTask();
		}

		/* Responding the client to tell them which port to connect to */
		try {
			Server selfServer = new Server();

			selfServer
					.setCurrentIP(InetAddress.getLocalHost().getHostAddress());

			selfServer.setHostname(InetAddress.getLocalHost().getHostName());
			selfServer.setReceivingPort(ReceiveRemoteMessagesTask.LISTEN_PORT);
			selfServer.setUsername("Server " + DCServer.getLocalHostname());

			selfServer.addStringMessage("TASK_OKAY");
			
			buffer = selfServer.toBytes();

			dataGram = new DatagramPacket(buffer, buffer.length);
			dataGram.setPort(clientNode.getReceivingPort());
			dataGram.setAddress(InetAddress.getByName(clientNode.getCurrentIP()));

			System.out.println("Datagram: PORT: " + clientNode.getReceivingPort()
					+ " IP: " + clientNode.getReceivingIP());

			System.out.println("Sending datagram");

			SocketManager.getInstance().sendDatagram(dataGram);

		} catch (UnknownHostException e2) {
			// TODO Auto-generated catch block
			e2.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		System.out.println("Listening for remote messages...");

		try {
			m_RecievingSocket = m_SendingSocket.accept();
			System.out.println("Received socket");

			send = new DataOutputStream(m_RecievingSocket.getOutputStream());
			// network input stream
			// receive = new BufferedReader(new InputStreamReader(
			// m_RecievingSocket.getInputStream()));

			inDataStream = new DataInputStream(
					m_RecievingSocket.getInputStream());

			do {

				// receivedMessage = receive.readLine();
				receivedMessage = inDataStream.readUTF();
				System.out.println("Received: " + receivedMessage);

				String returnMessage = receivedMessage.toUpperCase(Locale
						.getDefault());

				System.out.println("Sending message: " + returnMessage);
				send.writeUTF(returnMessage);

				if (receivedMessage.equalsIgnoreCase("q")) {
					System.out.println("Recieved QUIT command. Closing.");
					break;
				}

			} while (!receivedMessage.equalsIgnoreCase("q"));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		try {
			send.flush();
			send.close();
			inDataStream.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		stopTask();
	}