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
UDPServer
class. Performs recipe searches using the Edamam API.
- Ensure you have Java installed on your system.
- Compile the Java files using
javac UDPClient.java
andjavac -cp ".;lib\org.json.jar" UDPServer.java
. - Create a
lib
folder in the project directory. - Download the
org.json.jar
file and place it in thelib
folder. - Start the server by running
java UDPServer
by 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).