boolean waitForConnection() throws IOException {

		if (m_skServer == null){
			LOG.severe("waitForConnection() - Socket is null.");
			return (false);
		}

		LOG.info("Server is Waiting for connection...");
//		System.out.println("Server waiting for connection...");
		
		// Wait for a client connection
		m_skClient = m_skServer.accept();

		//Send him the deviceOpcode 
		ObjectOutputStream out  = new ObjectOutputStream(m_skClient.getOutputStream());
		MCPMsgDeviceOpcode msg = new MCPMsgDeviceOpcode(m_deviceOpcode);			
		out.writeObject(msg);
		
//		System.out.println("Server accepted connection from: " + m_skClient.getInetAddress().toString());
		LOG.info("Server accepted connection from: " + m_skClient.getInetAddress().toString());
		
		return (true);
	}