public void startServer() {
		try {
		    if (server == null)
		        server = new ServerSocket(1234, 100);
		    output = null;
			while (true) {
				try {
					waitforConnection(); // Wait until a connection is made
					setupStreams();
					readyListen();
					
				} catch (EOFException eofException) {
					System.out.println("\n Server Closed the Connection");
				} finally {
					//closeSockets();
				}
			}
		} catch (IOException ioException) {
		    System.out.println("\n Connection lost to other");
		    node.serverFree = true;
		    try {
		        node.setPacket(InetAddress.getLocalHost().getHostAddress(), 0,node.isConnectedAsClient, node.serverFree);
		    } catch (Exception e) {
		        System.out.println("Address Error");
		    }
            node.sendMessagePD();
		    node.startNodeServer();
		    //ioException.printStackTrace();
		}

	}