RecipeNet is a simple UDP client-server application for searching recipes using the Edamam API.
- UDPClient.java: Represents the UDP client. Sends recipe queries to the server and displays the search results.
- UDPServer.java: Represents the UDP server. Listens for incoming queries, performs recipe searches, and sends results back to clients.
- recipeSearch() method: In the
UDPServerclass. Performs recipe searches using the Edamam API.
- Ensure you have Java installed on your system.
- Compile the Java files using
javac UDPClient.javaandjavac -cp ".;lib\org.json.jar" UDPServer.java. - Create a
libfolder in the project directory. - Download the
org.json.jarfile and place it in thelibfolder. - Start the server by running
java UDPServerby the commandjava -cp ".;lib\org.json.jar" UDPServer. - Start the client by running
java UDPClient. - Enter a recipe query when prompted.
- View the search results displayed by the client.
- This project uses UDP (User Datagram Protocol) for communication, which is connectionless and unreliable. It's suitable for applications where occasional packet loss is acceptable.
- Ensure your firewall settings allow communication over the specified port (default port: 12000).